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 | 2dd50e757b72086bc0c208231333db02e8fe9877 (patch) | |
tree | 8aa1023f58b6699fbcc57a8ee73fa350d69be657 /util/src | |
parent | :bug: fix lazy request (diff) | |
download | server-2dd50e757b72086bc0c208231333db02e8fe9877.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`)}`); |