pinafore/routes/_database/clear.js

10 lines
357 B
JavaScript
Raw Normal View History

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