This commit is contained in:
@@ -2,8 +2,17 @@ import axios from 'axios'
|
||||
|
||||
export default {
|
||||
get(context, id) {
|
||||
axios.get(context.rootGetters.server + "/api/shares/" + id, context.rootGetters.headers).then((res) => {
|
||||
console.log(res);
|
||||
return new Promise((resolve) => {
|
||||
axios.get(context.rootGetters.server + "/api/shares/" + id, context.rootGetters.headers).then((res) => {
|
||||
if (res.data.object.type == "album") {
|
||||
console.log(res.data)
|
||||
res.data.object.tracks.forEach(track => {
|
||||
track.parent = res.data.object;
|
||||
track.parentType = "album"
|
||||
});
|
||||
}
|
||||
resolve(res.data);
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user