Skip to content

Commit

Permalink
Limit campaign naming to 99 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
BogoCvetkov committed Aug 25, 2023
1 parent 87ddc2a commit e0be065
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/api/src/campaign/campaign.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,11 +941,14 @@ export class CampaignService {
const listId = await this.marketingNotificationsService.provider.createNewContactList({
name: updated.title || updated.id,
})

const name = updated.title || ''

// Save the list_id in the DB
await this.prisma.notificationList.create({
data: {
id: listId,
name: updated.title,
name: name.slice(0, 99),
campaignId: updated.id,
},
})
Expand Down

0 comments on commit e0be065

Please sign in to comment.