Commit ad9202e7 authored by Andreas Heimann's avatar Andreas Heimann

exposed response in api

parent 653c4894
......@@ -74,13 +74,15 @@ class SHAPI {
let apiPath = this.apiBase + "song/" + _songId;
let supportedVersion = this.supportedVersion;
console.log(apiPath);
return axios.get(apiPath)
.then(function(response) {
if(response.data.version !== supportedVersion) {
throw new Error("Client is outdated!");
}
return response.data.data;
return response.data;
}).catch(function(error) {
throw new Error(error);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment