mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-21 23:37:55 +00:00
22 lines
523 B
JavaScript
22 lines
523 B
JavaScript
export default (client) => {
|
|
return {
|
|
fetchAll() {
|
|
return client.get('/database/tokens/')
|
|
},
|
|
create(values) {
|
|
return client.post('/database/tokens/', values)
|
|
},
|
|
update(tokenId, values) {
|
|
return client.patch(`/database/tokens/${tokenId}/`, values)
|
|
},
|
|
rotateKey(tokenId) {
|
|
return client.patch(`/database/tokens/${tokenId}/`, {
|
|
rotate_key: true,
|
|
})
|
|
},
|
|
delete(tokenId, values) {
|
|
return client.delete(`/database/tokens/${tokenId}/`)
|
|
},
|
|
}
|
|
}
|