Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit b47189a

Browse files
committed
Correcting the response order for status> json because if the http status is 201 and in the order as it was it would return 200
1 parent 80ee54c commit b47189a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/routes/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default (app: Router) => {
2525
try {
2626
const authServiceInstance = Container.get(AuthService);
2727
const { user, token } = await authServiceInstance.SignUp(req.body as IUserInputDTO);
28-
return res.json({ user, token }).status(201);
28+
return res.status(201).json({ user, token });
2929
} catch (e) {
3030
logger.error('🔥 error: %o', e);
3131
return next(e);

0 commit comments

Comments
 (0)