Skip to content

Commit

Permalink
Update initiative contact attributes to include privacy options for e…
Browse files Browse the repository at this point in the history
…mail and phone
  • Loading branch information
guillecro committed Jan 28, 2025
1 parent d49b942 commit 4dd38ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/initiativeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ exports.fetch = async (req, res) => {
{
model: models.InitiativeContact,
as: 'contact',
attributes: ['id', 'fullname', 'email', 'phone', 'keepPrivate', 'publicData'],
attributes: ['id', 'fullname', 'email', 'phone', 'keepEmailPrivate', 'keepPhonePrivate', 'publicData'],
},
{
model: models.Dimension,
Expand Down Expand Up @@ -197,8 +197,9 @@ exports.create = async (req, res) => {
const contact = {
fullname: req.body.contact.fullname,
email: req.body.contact.email,
keepEmailPrivate: req.body.contact.keepEmailPrivate,
phone: req.body.contact.phone,
keepPrivate: req.body.contact.keepPrivate,
keepPhonePrivate: req.body.contact.keepPhonePrivate,
}

const newContact = await models.InitiativeContact.create(contact, { transaction: t });
Expand Down

0 comments on commit 4dd38ec

Please sign in to comment.