1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-30 15:20:01 +00:00
bramw_baserow/web-frontend/modules/database/services/webhook.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
688 B
JavaScript
Raw Permalink Normal View History

2021-11-21 18:55:27 +00:00
export default (client) => {
return {
fetchAll(tableId) {
return client.get(`/database/webhooks/table/${tableId}/`)
},
create(tableId, values) {
return client.post(`/database/webhooks/table/${tableId}/`, values)
},
get(webhookId) {
return client.get(`/database/webhooks/${webhookId}/`)
},
update(webhookId, values) {
return client.patch(`/database/webhooks/${webhookId}/`, values)
},
delete(webhookId) {
return client.delete(`/database/webhooks/${webhookId}/`)
},
testCall(tableId, values) {
return client.post(
`/database/webhooks/table/${tableId}/test-call/`,
values
)
},
}
}