mirror of
https://github.com/captbaritone/webamp
synced 2024-11-21 23:32:16 +00:00
bring back GraphQL (#1256)
This commit is contained in:
parent
bb9fb130ef
commit
01cd21e489
@ -23,6 +23,7 @@ module.exports = {
|
||||
},
|
||||
devOptions: {
|
||||
/* ... */
|
||||
port: 3001
|
||||
},
|
||||
buildOptions: {
|
||||
/* ... */
|
||||
|
@ -75,22 +75,22 @@ async function initializeSkinListMenu() {
|
||||
`;
|
||||
|
||||
let bankskin1 = [];
|
||||
// try {
|
||||
// const response = await fetch("https://api.webampskins.org/graphql", {
|
||||
// method: "POST",
|
||||
// headers: {
|
||||
// "Content-Type": "application/json",
|
||||
// Accept: "application/json",
|
||||
// },
|
||||
// mode: "cors",
|
||||
// credentials: "include",
|
||||
// body: JSON.stringify({ query, variables: {} }),
|
||||
// });
|
||||
// const data = await response.json();
|
||||
// bankskin1 = data.data.modern_skins.nodes;
|
||||
// } catch (e) {
|
||||
// console.warn('faile to load skins from api.webampskins.org')
|
||||
// }
|
||||
try {
|
||||
const response = await fetch("https://api.webampskins.org/graphql", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
},
|
||||
mode: "cors",
|
||||
credentials: "include",
|
||||
body: JSON.stringify({ query, variables: {} }),
|
||||
});
|
||||
const data = await response.json();
|
||||
bankskin1 = data.data.modern_skins.nodes;
|
||||
} catch (e) {
|
||||
console.warn('faile to load skins from api.webampskins.org')
|
||||
}
|
||||
|
||||
const select = document.createElement("select");
|
||||
select.style.position = "absolute";
|
||||
|
Loading…
Reference in New Issue
Block a user