summary refs log tree commit diff
path: root/util/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-05 19:32:29 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-05 19:32:29 +0200
commit382fad0b7ee6f41b922d5afd85d850bf2484f742 (patch)
tree69e8de641de8bb4eb4abb63b502cf4387ce4d983 /util/src
parent:bug: fix lazy request (diff)
downloadserver-382fad0b7ee6f41b922d5afd85d850bf2484f742.tar.xz
:bug: fix windows db file path
Diffstat (limited to 'util/src')
-rw-r--r--util/src/util/Database.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/src/util/Database.ts b/util/src/util/Database.ts
index 5f057053..8bce3a6f 100644
--- a/util/src/util/Database.ts
+++ b/util/src/util/Database.ts
@@ -14,7 +14,7 @@ let dbConnectionString = process.env.DATABASE || path.join(process.cwd(), "datab
 export function initDatabase(): Promise<Connection> {
 	if (promise) return promise; // prevent initalizing multiple times
 
-	const type = dbConnectionString.includes(":") ? dbConnectionString.split(":")[0]?.replace("+srv", "") : "sqlite";
+	const type = dbConnectionString.includes("://") ? dbConnectionString.split(":")[0]?.replace("+srv", "") : "sqlite";
 	const isSqlite = type.includes("sqlite");
 
 	console.log(`[Database] ${yellow(`connecting to ${type} db`)}`);