This commit is contained in:
@@ -154,11 +154,14 @@ export default {
|
||||
}
|
||||
axios.put(context.rootGetters.server + "/api/albums/" + album._id, body, context.rootGetters.headers);
|
||||
},
|
||||
share(context, album) {
|
||||
return new Promise((resolve) => {
|
||||
axios.get(context.rootGetters.server + "/api/albums/" + album._id + "/share", context.rootGetters.headers).then(res => {
|
||||
resolve(res.data);
|
||||
});
|
||||
})
|
||||
shareEnable(context, album) {
|
||||
axios.post(context.rootGetters.server + "/api/albums/" + album._id + "/share", {}, context.rootGetters.headers).then(res => {
|
||||
album.share = res.data;
|
||||
});
|
||||
},
|
||||
shareDisable(context, album) {
|
||||
axios.delete(context.rootGetters.server + "/api/albums/" + album._id + "/share", context.rootGetters.headers).then(() => {
|
||||
album.share = {};
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user