1
0
mirror of https://github.com/Bubka/2FAuth.git synced 2025-07-19 21:36:19 +02:00
Files
2FAuth/resources/js_vue3/services/groupService.js
2023-11-21 13:45:50 +01:00

26 lines
590 B
JavaScript
Vendored

import { httpClientFactory } from '@/services/httpClientFactory'
const apiClient = httpClientFactory('api')
export default {
/**
*
* @returns
*/
getAll() {
return apiClient.get('groups')
},
get(id, config = {}) {
return apiClient.get('/groups/' + id, { ...config })
},
assign(accountsIds, groupId, config = {}) {
return apiClient.post('/groups/' + groupId + '/assign', { ids: accountsIds }, { ...config })
},
delete(id, config = {}) {
return apiClient.delete('/groups/' + id, { ...config })
},
}