2023-10-04 09:30:05 +02:00
|
|
|
import { httpClientFactory } from '@/services/httpClientFactory'
|
|
|
|
|
|
|
|
const apiClient = httpClientFactory('api')
|
|
|
|
|
|
|
|
export default {
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @returns
|
|
|
|
*/
|
|
|
|
getAll() {
|
|
|
|
return apiClient.get('groups')
|
|
|
|
},
|
2023-10-20 13:28:17 +02:00
|
|
|
|
2023-10-27 15:27:15 +02:00
|
|
|
get(id, config = {}) {
|
|
|
|
return apiClient.get('/groups/' + id, { ...config })
|
|
|
|
},
|
|
|
|
|
2023-10-20 13:28:17 +02:00
|
|
|
assign(accountsIds, groupId, config = {}) {
|
|
|
|
return apiClient.post('/groups/' + groupId + '/assign', {ids: accountsIds})
|
2023-10-27 15:27:15 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
delete(id, config = {}) {
|
|
|
|
return apiClient.delete('/groups/' + id, { ...config })
|
|
|
|
},
|
2023-10-04 09:30:05 +02:00
|
|
|
|
|
|
|
}
|