chore: Sets up store for teams settings page (#1727)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2021-02-04 13:19:59 +05:30
committed by GitHub
parent c61edff189
commit 6a614a520b
17 changed files with 608 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/* global axios */
import ApiClient from './ApiClient';
export class TeamsAPI extends ApiClient {
constructor() {
super('teams', { accountScoped: true });
}
getAgents({ teamId }) {
return axios.get(`${this.url}/${teamId}/team_members`);
}
addAgents({ teamId, agentsList }) {
return axios.post(`${this.url}/${teamId}/team_members`, {
user_ids: agentsList,
});
}
}
export default new TeamsAPI();