This commit is contained in:
yazninja 2022-04-26 09:37:52 +08:00
parent 8bfc714209
commit 57741ac2d9
4 changed files with 43 additions and 3 deletions

26
src/ciderkit/public.js Normal file
View file

@ -0,0 +1,26 @@
const CiderKit = {
v1: {
musickit: {
async mkv3(route, body, options) {
let opts = {
method: 'POST',
cache: 'no-cache',
credentials: 'same-origin',
headers: {
'Content-Type': 'application/json'
},
redirect: 'follow',
referrerPolicy: 'no-referrer',
body: {}
}
opts.body = JSON.stringify({
route: route,
body: body,
options: options
})
let response = await fetch("http://localhost:9000/api/musickit/v3", opts);
return response.json()
}
}
}
}