summaryrefslogtreecommitdiffstats
path: root/server/api/setup.js
diff options
context:
space:
mode:
authorJannik Schönartz2019-03-05 04:45:57 +0100
committerJannik Schönartz2019-03-05 04:45:57 +0100
commitf4aef09dbbb49270599487b40429f23fdc9ea6d2 (patch)
tree060150d83ec5feefa8d8970e7b8c3ccb077913e0 /server/api/setup.js
parent[webapp] migrate from vue cli 2 to vue cli 3 (diff)
downloadbas-f4aef09dbbb49270599487b40429f23fdc9ea6d2.tar.gz
bas-f4aef09dbbb49270599487b40429f23fdc9ea6d2.tar.xz
bas-f4aef09dbbb49270599487b40429f23fdc9ea6d2.zip
[server/authentication] Fix api syntax and eslint
Diffstat (limited to 'server/api/setup.js')
-rw-r--r--server/api/setup.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/api/setup.js b/server/api/setup.js
index daade25..228229a 100644
--- a/server/api/setup.js
+++ b/server/api/setup.js
@@ -18,7 +18,7 @@ noAuthRouter.get('/status', (req, res) => {
noAuthRouter.postAsync('/', async (req, res) => {
const body = req.body
const users = await db.user.findAll()
- if (users.length > 0) res.status(403).send({ status: 'USERTABLE_NOT_EMPTY', error_message: 'The user table is not empty, unauthorized creation is forbidden.' })
+ if (users.length > 0) res.status(403).send({ error: 'USERTABLE_NOT_EMPTY', message: 'The user table is not empty, unauthorized creation is forbidden.' })
else {
const result = await authentication.signup(body)
const code = result.code