Commit a18a4a7f authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent cfe975aa
......@@ -72,14 +72,17 @@ cronRemover.schedule(' */1 * * * *', () => {
async function remover() {
let work = await getWork()
if (work === 'true')
return true
let ip = await getIp()
console.log(ip)
var contents = await fs.readFileSync('./token.txt', 'utf8');
let Hetzner = require('./Hetzner')
let het = new Hetzner(contents)
await het.removeByIp(ip)
if (work === 'false') {
let ip = await getIp()
console.log(ip)
var contents = await fs.readFileSync('./token.txt', 'utf8');
let Hetzner = require('./Hetzner')
let het = new Hetzner(contents)
await het.removeByIp(ip)
}
return true
}
......@@ -123,7 +126,7 @@ function getIp() {
}
function postRequest() {
let data = {generation: generation, groups: groups}
let data = {generation: generation, groups: groups}
data = JSON.stringify(data)
data = cryptLib.encryptPlainTextWithRandomIV(data, key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment