Skip to content

Commit

Permalink
chore: set status as unauthorized
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Jun 21, 2024
1 parent e1bc703 commit ca19a30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion playground/server/api/webhooks/github.post.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineEventHandler(async (event) => {
const isValidWebhook = await isValidGithubWebhook(event)

if (!isValidWebhook) throw createError({ status: 400, message: 'Invalid webhook' })
if (!isValidWebhook) throw createError({ status: 401, message: 'Unauthorized: webhook is not valid' })

return { isValidWebhook }
})
2 changes: 1 addition & 1 deletion playground/server/api/webhooks/paddle.post.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineEventHandler(async (event) => {
const isValidWebhook = await isValidPaddleWebhook(event)

if (!isValidWebhook) throw createError({ status: 400, message: 'Invalid webhook' })
if (!isValidWebhook) throw createError({ status: 401, message: 'Unauthorized: webhook is not valid' })

return { isValidWebhook }
})
2 changes: 1 addition & 1 deletion playground/server/api/webhooks/paypal.post.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineEventHandler(async (event) => {
const isValidWebhook = await isValidPaypalWebhook(event)

if (!isValidWebhook) throw createError({ status: 400, message: 'Invalid webhook' })
if (!isValidWebhook) throw createError({ status: 401, message: 'Unauthorized: webhook is not valid' })

return { isValidWebhook }
})
2 changes: 1 addition & 1 deletion playground/server/api/webhooks/twitch.post.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineEventHandler(async (event) => {
const isValidWebhook = await isValidTwitchWebhook(event)

if (!isValidWebhook) throw createError({ status: 400, message: 'Invalid webhook' })
if (!isValidWebhook) throw createError({ status: 401, message: 'Unauthorized: webhook is not valid' })

return { isValidWebhook }
})

0 comments on commit ca19a30

Please sign in to comment.