mirror of
https://github.com/moku-project/Moku.git
synced 2026-06-13 09:19:56 -05:00
Chore: Port over Settings (Barely Works)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import type { ServerAdapter } from '$lib/server-adapters/types'
|
||||
import * as extensions from './extensions'
|
||||
import * as chapters from './chapters'
|
||||
import * as downloads from './downloads'
|
||||
import * as manga from './manga'
|
||||
import * as tracking from './tracking'
|
||||
|
||||
let adapter: ServerAdapter
|
||||
|
||||
@@ -9,4 +14,16 @@ export function initRequestManager(a: ServerAdapter) {
|
||||
export function getAdapter(): ServerAdapter {
|
||||
if (!adapter) throw new Error('RequestManager not initialized')
|
||||
return adapter
|
||||
}
|
||||
|
||||
export function clearPageCache(chapterId?: number): void {
|
||||
getAdapter().clearPageCache(chapterId)
|
||||
}
|
||||
|
||||
export const requestManager = {
|
||||
extensions,
|
||||
chapters,
|
||||
downloads,
|
||||
manga,
|
||||
tracking,
|
||||
}
|
||||
Reference in New Issue
Block a user