(type: 'anime' | 'manga', entries: Entry[])
| 164 | } |
| 165 | |
| 166 | async function importEntries(type: 'anime' | 'manga', entries: Entry[]) { |
| 167 | const table = type === 'anime' ? db.table('anime') : db.table('manga'); |
| 168 | await table.clear(); |
| 169 | return table.bulkPut(entries); |
| 170 | } |
| 171 | |
| 172 | export async function databaseRequest(call: string, param: any) { |
| 173 | switch (call) { |