2
0
Files
bot/apps/builder/services/webhook.ts
Baptiste Arnaud e17a1a0869 feat(editor): Restore published version button
Had to migrate webhooks into a standalone table
2022-03-01 07:37:01 +01:00

10 lines
267 B
TypeScript

import { Webhook } from 'models'
import { sendRequest } from 'utils'
export const saveWebhook = (webhookId: string, webhook: Partial<Webhook>) =>
sendRequest<{ webhook: Webhook }>({
method: 'PUT',
url: `/api/webhooks/${webhookId}`,
body: webhook,
})