16 lines
379 B
TypeScript
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();
|
|
},
|
|
};
|
|
}
|