Skip to content

Commit

Permalink
Update packages/xo-server/src/xo-mixins/rest-api.mjs
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu <[email protected]>
  • Loading branch information
MelissaFrncJrg and MathieuRA authored Feb 11, 2025
1 parent 9dd6f54 commit 02a05d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/xo-server/src/xo-mixins/rest-api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ export default class RestApi {
json(),
wrap(async (req, res) => {
const { name, password, permission } = req.body
if (!name || !password) {
if (name != null || password != null) {
return res.status(400).json({ message: 'Name and password are required.' })
}
const user = await app.createUser({ name, password, permission })
Expand Down

0 comments on commit 02a05d7

Please sign in to comment.