summary refs log tree commit diff
path: root/api/scripts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-17 23:42:40 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-17 23:42:40 +0200
commit859fdd679b2f42ae4fd90b3a1a7958370fcdccb8 (patch)
tree6b65ca26539f3b8fab03b4b179762765188c1fb7 /api/scripts
parent:bug: fix vanity url (diff)
downloadserver-859fdd679b2f42ae4fd90b3a1a7958370fcdccb8.tar.xz
:bug: fix body parse treating null not as undefined (except for icons/avatars)
Diffstat (limited to 'api/scripts')
-rw-r--r--api/scripts/globalSetup.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/scripts/globalSetup.js b/api/scripts/globalSetup.js

index 76cd8e0d..98e70fb9 100644 --- a/api/scripts/globalSetup.js +++ b/api/scripts/globalSetup.js
@@ -1,10 +1,11 @@ const fs = require("fs"); +const path = require("path"); const { FosscordServer } = require("../dist/Server"); const Server = new FosscordServer({ port: 3001 }); global.server = Server; module.exports = async () => { try { - fs.unlinkSync(`${__dirname}/../database.db`); + fs.unlinkSync(path.join(__dirname, "..", "database.db")); } catch {} return await Server.start(); };