diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-05 19:32:29 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-05 19:32:29 +0200 |
commit | 382fad0b7ee6f41b922d5afd85d850bf2484f742 (patch) | |
tree | 69e8de641de8bb4eb4abb63b502cf4387ce4d983 /util/src | |
parent | :bug: fix lazy request (diff) | |
download | server-382fad0b7ee6f41b922d5afd85d850bf2484f742.tar.xz |
:bug: fix windows db file path
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/util/Database.ts | 2 |
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`)}`); |