move the commit into the try/catch block
This commit is contained in:
parent
d716c7efd0
commit
f1ed21f3f0
|
@ -14,13 +14,15 @@ export default {
|
|||
|
||||
try {
|
||||
await getAPI.put(`coaches/${userId}.json`, coachData);
|
||||
} catch (err) {
|
||||
console.log(err.response.status);
|
||||
}
|
||||
|
||||
context.commit('registerCoach', {
|
||||
...coachData,
|
||||
id: userId
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err.response.status);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.response.status);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Reference in New Issue