We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5392c46 + 311db88 commit 83b11a4Copy full SHA for 83b11a4
server/controllers/user.controller/signup.ts
@@ -71,7 +71,11 @@ export const createUser: RequestHandler<
71
res.json(userResponse(user));
72
} catch (mailErr) {
73
console.error(mailErr);
74
- res.status(500).json({ error: 'Failed to send verification email.' });
+ if (process.env.NODE_ENV !== 'production') {
75
+ res.json(userResponse(user));
76
+ } else {
77
+ res.status(500).json({ error: 'Failed to send verification email.' });
78
+ }
79
}
80
});
81
} catch (err) {
0 commit comments