Skip to content

Commit

Permalink
fix: remove webhook total counts limit (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrn14897 authored Oct 14, 2024
1 parent a148c06 commit b47c965
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-owls-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperdx/api': patch
---

fix: remove webhook total counts limit
9 changes: 0 additions & 9 deletions packages/api/src/routers/api/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ router.post(
}
const { name, service, url, description, queryParams, headers, body } =
req.body;
const totalWebhooks = await Webhook.countDocuments({
team: teamId,
service,
});
if (totalWebhooks >= 5) {
return res.status(400).json({
message: 'You can only have 5 webhooks per team per service',
});
}
if (await Webhook.findOne({ team: teamId, service, url })) {
return res.status(400).json({
message: 'Webhook already exists',
Expand Down

0 comments on commit b47c965

Please sign in to comment.