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 = {}) {
|
2023-10-30 12:57:19 +01:00
|
|
|
return apiClient.post('/groups/' + groupId + '/assign', { ids: accountsIds }, { ...config })
|
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
|
|
|
|
|
|
|
}
|