mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-24 09:08:16 +08:00
add manage html
This commit is contained in:
23
html/manage-utils.js
Normal file
23
html/manage-utils.js
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user