update
This commit is contained in:
@@ -55,8 +55,11 @@ export const actions = {
|
||||
commit(types.default.SET_AGENT_CREATING_STATUS, true);
|
||||
try {
|
||||
const response = await AgentAPI.create(agentInfo);
|
||||
commit(types.default.ADD_AGENT, response.data);
|
||||
const agent = { ...response.data };
|
||||
delete agent.temporary_password;
|
||||
commit(types.default.ADD_AGENT, agent);
|
||||
commit(types.default.SET_AGENT_CREATING_STATUS, false);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
commit(types.default.SET_AGENT_CREATING_STATUS, false);
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user