mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Allow webhooks with same event types
This commit is contained in:
parent
b206f8e6b1
commit
104da191d2
1 changed files with 0 additions and 13 deletions
|
|
@ -194,20 +194,7 @@ export const setWebhookResolver = authorized<
|
|||
}
|
||||
|
||||
webhookToSave.id = input.id
|
||||
} else {
|
||||
// Create
|
||||
const existingWebhook = await getRepository(Webhook).findOneBy({
|
||||
user: { id: uid },
|
||||
eventTypes: `{${input.eventTypes.join(',')}}`,
|
||||
})
|
||||
|
||||
if (existingWebhook) {
|
||||
return {
|
||||
errorCodes: [SetWebhookErrorCode.AlreadyExists],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const webhook = await getRepository(Webhook).save({
|
||||
user,
|
||||
...webhookToSave,
|
||||
|
|
|
|||
Loading…
Reference in a new issue