1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/modules/database/services/webhook.js
2021-11-21 18:55:27 +00:00

26 lines
688 B
JavaScript

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
)
},
}
}