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