add manage html

This commit is contained in:
zizifn
2022-06-12 03:31:38 +08:00
committed by zizifn
parent cc280c837e
commit a59f4d83fb
4 changed files with 156 additions and 0 deletions

23
html/manage-utils.js Normal file
View File

@@ -0,0 +1,23 @@
const testStr= "1111";
async function restartAPP(appname, key){
const resp = await fetch(`https://api.heroku.com/apps/${appname}/dynos`,{
method: "Delete",
headers: {
Accept: "application/vnd.heroku+json; version=3",
Authorization: `Bearer ${key}`
}
});
if(resp.status === 202){
alert("restart success!")
}
}
export {
testStr,
restartAPP
}