gadl/platform.ts
2023-11-19 16:18:00 +09:00

16 lines
379 B
TypeScript

import type { Database } from "./database";
import type { Browser } from "./browser";
import { DmmBooks } from "./platforms/dmm-books";
export function createPlatform(db: Database, browser: Browser) {
const platform = DmmBooks(db, browser);
return {
async login() {
await platform.login();
},
async logout() {
await platform.logout();
},
};
}