Issue Summary:
In the auth.module.js here you have got some code like:
[UPDATE_USER](context, payload) {
const { email, username, password, image, bio } = payload;
const user = {
email,
username,
bio,
image
};
if (password) {
user.password = password;
}
return ApiService.put("user", user).then(({ data }) => {
context.commit(SET_AUTH, data.user);
return data;
});
}
Those promise calls could be simplified with async and await calls.
Resources:
Acceptance Criteria:
- A test is introduced, this is perfect work for TDD
- There is no
.then(... or .catch(... block or any promise like structure
The main issue can be found here #5
Issue Summary:
In the auth.module.js here you have got some code like:
Those promise calls could be simplified with async and await calls.
Resources:
Acceptance Criteria:
.then(...or.catch(...block or any promise like structureThe main issue can be found here #5