summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-17 00:41:21 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-17 00:41:21 +0200
commit841f1d6d2a83d0cdd19dbd92a77e9229acb17610 (patch)
treeaaef408f9bd69c9a488326b9a20d2d4d10106c09 /api
parent:bug: user settings (diff)
downloadserver-841f1d6d2a83d0cdd19dbd92a77e9229acb17610.tar.xz
:art: clean up instances on start
Diffstat (limited to 'api')
-rw-r--r--api/src/util/Instance.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/src/util/Instance.ts b/api/src/util/Instance.ts
index 7dcd126e..6bddfa98 100644
--- a/api/src/util/Instance.ts
+++ b/api/src/util/Instance.ts
@@ -1,4 +1,4 @@
-import { Config, Guild } from "@fosscord/util";
+import { Config, Guild, Session } from "@fosscord/util";
 
 export async function initInstance() {
 	// TODO: clean up database and delete tombstone data
@@ -15,4 +15,7 @@ export async function initInstance() {
 			await Config.set({ guild: { autoJoin: { guilds: [guild.id] } } });
 		}
 	}
+
+	// TODO: do no clear sessions for instance cluster
+	await Session.delete({});
 }