Skip to content

Commit

Permalink
dont return res.send
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfeil committed Aug 9, 2024
1 parent 5495a95 commit b2bfdd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/api/lib/controllers/usersController.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const registerUser = async function registerUser (req, res) {
try {
const { token, refreshToken } = await createToken(newUser);

return res.send(201, {
res.send(201, {
code: 'Created',
message: 'Successfully registered new user',
data: { user: newUser },
Expand Down Expand Up @@ -115,7 +115,7 @@ const signIn = async function signIn (req, res) {
if (await user.checkPassword(password)) {
const { token, refreshToken } = await createToken(user);

return res.send(200, {
res.send(200, {
code: 'Authorized',
message: 'Successfully signed in',
data: { user },
Expand Down

0 comments on commit b2bfdd1

Please sign in to comment.