diff --git a/src/controllers/auth/user.js b/src/controllers/auth/user.js index b0d891a..f609fc2 100644 --- a/src/controllers/auth/user.js +++ b/src/controllers/auth/user.js @@ -92,7 +92,7 @@ const registerUser = async (req, res) => { } */ - const { username, password } = req.body.fields; + const { username, password, ...optionalFields } = req.body.fields; try { if (!username) { @@ -156,6 +156,7 @@ const registerUser = async (req, res) => { salt, hashed_password: hashedPassword, is_superuser: 'false', + ...optionalFields, }, });