server: auth: /register should use isAdmin from req.body

Now initial user creation shares the endpoint with subsequent ones.
This commit is contained in:
Jesse Chan
2020-10-11 18:07:24 +08:00
parent 86a05aa8f2
commit 720bd5d532

View File

@@ -127,7 +127,7 @@ router.post<unknown, unknown, AuthRegisterOptions, {cookie: string}>('/register'
host: req.body.host,
port: req.body.port,
socketPath: req.body.socketPath,
isAdmin: true,
isAdmin: req.body.isAdmin === true,
},
(createUserResponse, createUserError) => {
if (createUserError) {