1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-13 10:48:19 +01:00
Pinafore-Web-Client-Frontend/routes/_database/clear.js

10 lines
357 B
JavaScript
Raw Normal View History

2018-02-09 07:04:10 +01:00
import { accountsCache, clearCache, metaCache, statusesCache } from './cache'
import { deleteDatabase } from './databaseLifecycle'
2018-02-09 07:29:29 +01:00
export async function clearDatabaseForInstance (instanceName) {
2018-02-09 07:04:10 +01:00
clearCache(statusesCache, instanceName)
clearCache(accountsCache, instanceName)
clearCache(metaCache, instanceName)
await deleteDatabase(instanceName)
2018-02-09 07:29:29 +01:00
}