mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-24 09:08:16 +08:00
23 lines
471 B
JavaScript
23 lines
471 B
JavaScript
|
|
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
|
|
} |