(call: string, param: any)
| 170 | } |
| 171 | |
| 172 | export async function databaseRequest(call: string, param: any) { |
| 173 | switch (call) { |
| 174 | case 'entry': |
| 175 | indexUpdate(); |
| 176 | return getEntry(param.type, param.id); |
| 177 | case 'entryByMalId': |
| 178 | indexUpdate(); |
| 179 | return getEntryByMalId(param.type, param.id); |
| 180 | default: |
| 181 | throw `Unknown call "${call}"`; |
| 182 | } |
| 183 | } |
no test coverage detected