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

21 lines
589 B
JavaScript

export default (client) => {
return {
fetchAll(workspaceId, { offset = 0, limit = 50 }) {
return client.get(
`/notifications/${workspaceId}/?offset=${offset}&limit=${limit}`
)
},
clearAll(workspaceId) {
return client.delete(`/notifications/${workspaceId}/`)
},
markAllAsRead(workspaceId) {
return client.post(`/notifications/${workspaceId}/mark-all-as-read/`)
},
markAsRead(workspaceId, notificationId) {
return client.patch(`/notifications/${workspaceId}/${notificationId}/`, {
read: true,
})
},
}
}