feat: replace browser login with imported Reddit sessions
This commit is contained in:
1 parent
2b0545afcf
commit
c483c7b8be
76 files changed
+2048
-2828
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
type ControlResponse,
|
||||
type Timers,
|
||||
} from './contracts.js';
|
||||
import { createDashboardRequest } from './request.js';
|
||||
|
||||
export class ApiError extends Error {
|
||||
constructor(
|
||||
@@ -39,9 +40,7 @@ export interface DashboardApi {
|
||||
}
|
||||
|
||||
export function createDashboardApi(fetchImplementation?: typeof fetch): DashboardApi {
|
||||
function request(input: RequestInfo | URL, init?: RequestInit): Promise<Response> {
|
||||
return (fetchImplementation ?? globalThis.fetch)(input, init);
|
||||
}
|
||||
const request = createDashboardRequest(fetchImplementation);
|
||||
|
||||
return {
|
||||
async getStats() {
|
||||
|
||||
Reference in new issue
Block a user