Skip to content

Commit

Permalink
fix: encore uri token
Browse files Browse the repository at this point in the history
  • Loading branch information
baptadn committed Jan 13, 2025
1 parent 4c21f42 commit 2f4dceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion back/api/actuality/services/actuality.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
actuality_image: image.formats.medium.url,
actuality_description: removeMd(actuality.content).split(' ').slice(0, 35).join(' ') + '...',
actuality_link: `${process.env.FRONT_URL}/actualites/${actuality.slug}`,
notification_link: `${process.env.FRONT_URL}/notifications?token=${token}`,
notification_link: `${process.env.FRONT_URL}/notifications?token=${encodeURIComponent(token)}`,
email_message: actuality.notification_email_message ? converter.makeHtml(actuality.notification_email_message) : null,
}
)
Expand Down
2 changes: 1 addition & 1 deletion web/pages/notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const getServerSideProps: GetServerSideProps<SSRConfig> = async ({

try {
const decryptedEmail = CryptoJS.AES.decrypt(
token,
decodeURIComponent(token as string),
process.env.HASH_EMAIL_NOTIFICATION,
).toString(CryptoJS.enc.Utf8)

Expand Down

0 comments on commit 2f4dceb

Please sign in to comment.