22 lines
723 B
JavaScript
22 lines
723 B
JavaScript
const { getAuth } = require('./auth_manager');
|
|
|
|
async function main() {
|
|
const { token } = await getAuth();
|
|
const staticAppId = '1a83e477-9e98-4dbb-8931-cc273db6e607';
|
|
console.log(`Deleting temporary static app ${staticAppId}...`);
|
|
const res = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
|
|
method: 'POST',
|
|
headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
|
|
body: JSON.stringify({
|
|
query: `mutation DeleteStaticApp {
|
|
deleteStaticApp(arg1: { appId: "1a83e477-9e98-4dbb-8931-cc273db6e607" }) {
|
|
output
|
|
}
|
|
}`
|
|
})
|
|
});
|
|
console.log('Result:\n', JSON.stringify(await res.json(), null, 2));
|
|
}
|
|
|
|
main().catch(console.error);
|