fix: usage of API_URL

This commit is contained in:
Divlo
2022-03-21 20:44:15 +01:00
parent ad903da6a4
commit 694ac58aad
11 changed files with 18 additions and 21 deletions

View File

@ -12,7 +12,7 @@ import {
userPublicSchema
} from '../../../models/User.js'
import { sendEmail } from '../../../tools/email/sendEmail.js'
import { HOST, PORT } from '../../../tools/configurations/index.js'
import { API_URL } from '../../../tools/configurations/index.js'
const queryPostSignupSchema = Type.Object({
redirectURI: Type.Optional(Type.String({ format: 'uri-reference' }))
@ -76,7 +76,7 @@ export const postSignupUser: FastifyPluginAsync = async (fastify) => {
await sendEmail({
type: 'confirm-email',
email,
url: `${request.protocol}://${HOST}:${PORT}/users/confirm-email?temporaryToken=${temporaryToken}${redirectQuery}`,
url: `${API_URL}/users/confirm-email?temporaryToken=${temporaryToken}${redirectQuery}`,
language,
theme
})