mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-01-15 21:18:41 +00:00
18 lines
491 B
JavaScript
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}/`)
|
|
},
|
|
}
|
|
}
|