tolta la richiesta di accettazione dei RIS, che ora vengono accettati automaticamente.

This commit is contained in:
Surya Paolo
2024-07-03 13:22:32 +02:00
parent 1c7b89a55b
commit 76c34dbbe0
10 changed files with 226 additions and 78 deletions

View File

@@ -1125,10 +1125,10 @@ module.exports = {
typeid = shared_consts.TypeNotifs.ID_CIRCUIT_COINS_ACCEPTED;
} else if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT_SENT) {
typeid = shared_consts.TypeNotifs.ID_CIRCUIT_COINS_ACCEPTED_SENT;
} else if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REFUSE) {
typeid = shared_consts.TypeNotifs.ID_CIRCUIT_COINS_REFUSED;
} else if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REFUSE_SENT) {
typeid = shared_consts.TypeNotifs.ID_CIRCUIT_COINS_REFUSED_SENT;
// } else if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REFUSE) {
// typeid = shared_consts.TypeNotifs.ID_CIRCUIT_COINS_REFUSED;
//} else if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REFUSE_SENT) {
// typeid = shared_consts.TypeNotifs.ID_CIRCUIT_COINS_REFUSED_SENT;
}
}
@@ -5162,8 +5162,38 @@ module.exports = {
console.error('Errore durante la pulizia dell\'HTML:', error);
throw error; // Oppure, gestisci l'errore come preferisci
}
}
},
getHostWithNoHttporHttps(url) {
try {
const parsedUrl = new URL(url);
return parsedUrl.host;
} catch (error) {
console.error('Errore durante la pulizia dell\'HTML:', error);
throw error; // Oppure, gestisci l'errore come preferisci
}
},
// Crea un file con all'interno il nome del dominio per ogni app:
createFileWithDomainName() {
const arrapps = getApps();
const filename = server_constants.FILECONFIG_SERVER;
for (const app of arrapps) {
fs.writeFile(filename, this.getHostWithNoHttporHttps(app.host), function (err) {
if (err) {
console.log(err);
}
});
if (app.host_test) {
fs.writeFile(filename, this.getHostWithNoHttporHttps(app.host_test), function (err) {
if (err) {
console.log(err);
}
});
}
}
},
// Scriviere qui SOPRA le funzioni
};