1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-02-06 22:00:09 +00:00
bramw_baserow/web-frontend/modules/core/services/notification.js

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