summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-29 16:58:56 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-29 16:58:56 +0200
commit0066ba223e813b7452cebc11605836604da13533 (patch)
treef8ad648eb0cea4041da451be57c72a86d27354d0
parentfix bundle (diff)
downloadserver-0066ba223e813b7452cebc11605836604da13533.tar.xz
fix cdn
-rw-r--r--cdn/src/Server.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/cdn/src/Server.ts b/cdn/src/Server.ts
index 522e11c2..f4a6b576 100644
--- a/cdn/src/Server.ts
+++ b/cdn/src/Server.ts
@@ -1,5 +1,5 @@
 import { Server, ServerOptions } from "lambert-server";
-import { Config, db } from "@fosscord/util";
+import { Config, initDatabase } from "@fosscord/util";
 import path from "path";
 import avatarsRoute from "./routes/avatars";
 
@@ -13,8 +13,7 @@ export class CDNServer extends Server {
 	}
 
 	async start() {
-		// @ts-ignore
-		await (db as Promise<Connection>);
+		await initDatabase();
 		await Config.init();
 		this.app.use((req, res, next) => {
 			res.set("Access-Control-Allow-Origin", "*");