1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-12 18:28:03 +01:00
Pinafore-Web-Client-Frontend/routes/_database/clear.js
2018-02-08 22:29:29 -08:00

10 lines
357 B
JavaScript

import { accountsCache, clearCache, metaCache, statusesCache } from './cache'
import { deleteDatabase } from './databaseLifecycle'
export async function clearDatabaseForInstance (instanceName) {
clearCache(statusesCache, instanceName)
clearCache(accountsCache, instanceName)
clearCache(metaCache, instanceName)
await deleteDatabase(instanceName)
}