feat: Set up store for teams (#1689)
This commit is contained in:
committed by
GitHub
parent
cadb246eaa
commit
941d4219f0
@@ -46,6 +46,20 @@ export const actions = {
|
||||
commit(SET_TEAM_MEMBERS_UI_FLAG, { isCreating: false });
|
||||
}
|
||||
},
|
||||
update: async ({ commit }, { agentsList, teamId }) => {
|
||||
commit(SET_TEAM_MEMBERS_UI_FLAG, { isUpdating: true });
|
||||
try {
|
||||
const response = await TeamsAPI.updateAgents({
|
||||
agentsList,
|
||||
teamId,
|
||||
});
|
||||
commit(ADD_AGENTS_TO_TEAM, response);
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
} finally {
|
||||
commit(SET_TEAM_MEMBERS_UI_FLAG, { isUpdating: false });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const mutations = {
|
||||
|
||||
Reference in New Issue
Block a user