summary refs log tree commit diff
path: root/api/src/util/handlers/Instance.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-15 11:13:21 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-15 11:13:21 +0200
commit1a94fb1208bf0e4c669cad16aff5f57dc0bf7a3c (patch)
tree1035116ddbaacc5fcc5ae250a6592eb88f78f75c /api/src/util/handlers/Instance.ts
parentDo the funny thing (make user->invite cascade delet) (diff)
parentchange dev panel path, we missed this one... (diff)
downloadserver-1a94fb1208bf0e4c669cad16aff5f57dc0bf7a3c.tar.xz
Merge branch 'dev/restructure' into staging
Diffstat (limited to 'api/src/util/handlers/Instance.ts')
-rw-r--r--api/src/util/handlers/Instance.ts22
1 files changed, 0 insertions, 22 deletions
diff --git a/api/src/util/handlers/Instance.ts b/api/src/util/handlers/Instance.ts
deleted file mode 100644

index 7c337270..00000000 --- a/api/src/util/handlers/Instance.ts +++ /dev/null
@@ -1,22 +0,0 @@ -import { Config, Guild, Session } from "@fosscord/util"; -import { createQueryBuilder } from "typeorm"; - -export async function initInstance() { - // TODO: clean up database and delete tombstone data - // TODO: set first user as instance administrator/or generate one if none exists and output it in the terminal - - // create default guild and add it to auto join - // TODO: check if any current user is not part of autoJoinGuilds - const { autoJoin } = Config.get().guild; - - if (autoJoin.enabled && !autoJoin.guilds?.length) { - let guild = await Guild.findOne({where: {}, order: {id: "ASC"}}); - if (guild) { - // @ts-ignore - await Config.set({ guild: { autoJoin: { guilds: [guild.id] } } }); - } - } - - // TODO: do no clear sessions for instance cluster - await Session.delete({}); -}