restore progress after reloading the page (F5)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -88,15 +88,18 @@ export default {
|
||||
.post(context.rootGetters.server + "/api/user/progress", item, context.rootGetters.headers);
|
||||
},
|
||||
getProgress(context, parent) {
|
||||
if (context.state._id == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
axios
|
||||
.get(context.rootGetters.server + "/api/user/progress/" + parent._id, context.rootGetters.headers)
|
||||
.then((res) => {
|
||||
parent.progress = res.data;
|
||||
});
|
||||
return new Promise((resolve) => {
|
||||
if (context.state._id == -1) {
|
||||
resolve();
|
||||
} else {
|
||||
axios
|
||||
.get(context.rootGetters.server + "/api/user/progress/" + parent._id, context.rootGetters.headers)
|
||||
.then((res) => {
|
||||
parent.progress = res.data;
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
resetProgress(context, parentId) {
|
||||
if (context.state._id == -1) {
|
||||
|
||||
Reference in New Issue
Block a user