mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
server: auth: /register should use isAdmin from req.body
Now initial user creation shares the endpoint with subsequent ones.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user