Skip to content

Commit

Permalink
Use const and camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
pratishta authored and TylerMatteo committed Nov 12, 2024
1 parent 56d9037 commit 0ca02e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/subscriber/subscriber.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ export class SubscriberService {
* @returns {object}
*/
async update(environment: string, email: string, custom_fields: object) {
var updated_custom_fields = Object.entries(custom_fields).reduce((acc, curr) => ({ ...acc, [`zap_${environment}_${curr[0]}`]: curr[1] }), {})
const updatedCustomFields = Object.entries(custom_fields).reduce((acc, curr) => ({ ...acc, [`zap_${environment}_${curr[0]}`]: curr[1] }), {})

const request = {
url: `/v3/marketing/contacts`,
method: <HttpMethod>'PUT',
body: {
"contacts": [{
"email": email,
"custom_fields": updated_custom_fields
"custom_fields": updatedCustomFields
}]
}
}
Expand Down

0 comments on commit 0ca02e5

Please sign in to comment.