sshChat-CLI/commands/restart.js
2023-01-11 15:48:57 -05:00

21 lines
493 B
JavaScript

// restart.js
const unirest = require("unirest");
async function restart(key) {
async function restartContainer(key) {
let restartContainer = await unirest
.get('https://api.discord-linux.com/restart')
.headers({
'Accept': 'application/json', 'Content-Type': 'application/json',
'x-discord-linux-auth': key
})
return restartContainer.body
}
const response = await restartContainer(key)
console.log(response)
}
module.exports = { restart }