Completely fix api calls
Fix web browser api call
This commit is contained in:
parent
a7d1ce0069
commit
56defb0e5b
4 changed files with 11 additions and 18 deletions
|
@ -779,9 +779,10 @@ const app = new Vue({
|
|||
|
||||
document.addEventListener('musickitloaded', function () {
|
||||
// MusicKit global is now defined
|
||||
ipcRenderer.on('devkey', (event, key) => {
|
||||
function initMusicKit () {
|
||||
let parsedJson = JSON.parse(this.responseText)
|
||||
MusicKit.configure({
|
||||
developerToken: key,
|
||||
developerToken: parsedJson.Key,
|
||||
app: {
|
||||
name: 'My Cool Web App',
|
||||
build: '1978.4.1'
|
||||
|
@ -790,7 +791,11 @@ document.addEventListener('musickitloaded', function () {
|
|||
setTimeout(() => {
|
||||
app.init()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
const request = new XMLHttpRequest();
|
||||
request.addEventListener("load", initMusicKit);
|
||||
request.open("GET", "https://devkey.cider.sh/");
|
||||
request.send();
|
||||
});
|
||||
|
||||
function xmlToJson(xml) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue