server: drop databases before removing user

This commit is contained in:
Jesse Chan
2022-05-01 14:55:50 -07:00
parent 1af1d24755
commit e09accd696
12 changed files with 52 additions and 18 deletions
+8
View File
@@ -46,6 +46,14 @@ class NotificationService extends BaseService<NotificationServiceEvents> {
})();
}
async destroy(drop: boolean) {
if (drop) {
await this.db.dropDatabaseAsync();
}
return super.destroy(drop);
}
emitUpdate = () => {
this.emit('NOTIFICATION_COUNT_CHANGE', {
id: Date.now(),