mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Feat: add create brewery post, brewery image upload
Add address autocomplete, using MapBox
This commit is contained in:
@@ -11,6 +11,7 @@ import findUserByEmail from '@/services/User/findUserByEmail';
|
||||
import validateRequest from '@/config/nextConnect/middleware/validateRequest';
|
||||
import APIResponseValidationSchema from '@/validation/APIResponseValidationSchema';
|
||||
|
||||
import { NODE_ENV } from '@/config/env';
|
||||
import sendConfirmationEmail from '@/services/User/sendConfirmationEmail';
|
||||
|
||||
interface RegisterUserRequest extends NextApiRequest {
|
||||
@@ -44,7 +45,9 @@ const registerUser = async (req: RegisterUserRequest, res: NextApiResponse) => {
|
||||
username: user.username,
|
||||
});
|
||||
|
||||
await sendConfirmationEmail(user);
|
||||
if (NODE_ENV === 'production') {
|
||||
await sendConfirmationEmail(user);
|
||||
}
|
||||
|
||||
res.status(201).json({
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user