mirror of
https://github.com/baserow/baserow.git
synced 2026-12-06 09:18:47 +00:00
29 lines
872 B
JavaScript
29 lines
872 B
JavaScript
export default (client) => {
|
|
return {
|
|
fetchAll(groupId = null) {
|
|
const groupUrl = groupId !== null ? `group/${groupId}/` : ''
|
|
return client.get(`/applications/${groupUrl}`)
|
|
},
|
|
create(groupId, values) {
|
|
return client.post(`/applications/group/${groupId}/`, values)
|
|
},
|
|
asyncDuplicate(applicationId) {
|
|
return client.post(`/applications/${applicationId}/duplicate/async/`)
|
|
},
|
|
get(applicationId) {
|
|
return client.get(`/applications/${applicationId}/`)
|
|
},
|
|
update(applicationId, values) {
|
|
return client.patch(`/applications/${applicationId}/`, values)
|
|
},
|
|
order(groupId, order) {
|
|
return client.post(`/applications/group/${groupId}/order/`, {
|
|
application_ids: order,
|
|
})
|
|
},
|
|
delete(applicationId) {
|
|
return client.delete(`/applications/${applicationId}/`)
|
|
},
|
|
}
|
|
}
|