1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-01-15 21:18:41 +00:00
bramw_baserow/web-frontend/modules/dashboard/services/widget.js
2024-12-25 08:40:24 +00:00

18 lines
491 B
JavaScript

export default (client) => {
return {
getAllWidgets(dashboardId) {
return client.get(`/dashboard/${dashboardId}/widgets/`)
},
create(dashboardId, widget = {}) {
return client.post(`/dashboard/${dashboardId}/widgets/`, {
...widget,
})
},
update(widgetId, values = {}) {
return client.patch(`/dashboard/widgets/${widgetId}/`, values)
},
delete(widgetId) {
return client.delete(`/dashboard/widgets/${widgetId}/`)
},
}
}