Skip to content

Commit

Permalink
changes email subscription status for new users to subscribed
Browse files Browse the repository at this point in the history
  • Loading branch information
thelmaboamah committed Nov 22, 2023
1 parent e310b26 commit afd9439
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/server/src/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ async function createUser(user) {
.into('users')
.returning(['id', 'created_at']);

setUserAvatar(response[0].id)
const emailUnsubscribePreference = Object.assign(
...Object.values(emailConstants.notificationType).map(
(k) => ({ [k]: emailConstants.emailSubscriptionStatus.unsubscribed }),
(k) => ({ [k]: emailConstants.emailSubscriptionStatus.subscribed }),
),
);
module.exports.setUserEmailSubscriptionPreference(response[0].id, user.agency_id, emailUnsubscribePreference);
Expand Down

0 comments on commit afd9439

Please sign in to comment.