- menu BOT
- verified_by_aportador
This commit is contained in:
@@ -45,6 +45,8 @@ console.log("DB: " + process.env.DATABASE);
|
||||
|
||||
var app = express();
|
||||
|
||||
let telegrambot = null;
|
||||
|
||||
const tools = require('./tools/general');
|
||||
|
||||
require('./models/cfgserver');
|
||||
@@ -69,6 +71,7 @@ myLoad().then(ris => {
|
||||
require('./models/mailinglist');
|
||||
require('./models/newstosent');
|
||||
require('./models/mypage');
|
||||
require('./models/bot');
|
||||
require('./models/calzoom');
|
||||
const mysql_func = require('./mysql/mysql_func');
|
||||
|
||||
@@ -222,12 +225,11 @@ async function mystart() {
|
||||
|
||||
testmsgwebpush();
|
||||
|
||||
faitest();
|
||||
|
||||
// tools.sendNotifToAdmin('Riparti', 'Riparti');
|
||||
// sendemail.testemail('2', 'it');
|
||||
|
||||
let miapass = 'passpao1pa@1A';
|
||||
let miapass = '';
|
||||
|
||||
if (miapass !== '') {
|
||||
let crypt = tools.cryptdata(miapass);
|
||||
@@ -242,11 +244,14 @@ async function mystart() {
|
||||
}
|
||||
}
|
||||
|
||||
telegrambot = require('./telegram/telegrambot');
|
||||
|
||||
await inizia();
|
||||
|
||||
await resetProcessingJob();
|
||||
|
||||
faitest();
|
||||
|
||||
|
||||
// ----------------- MAILCHIMP -----
|
||||
const querystring = require('querystring');
|
||||
@@ -369,7 +374,6 @@ async function resetProcessingJob() {
|
||||
|
||||
async function inizia() {
|
||||
|
||||
const telegrambot = require('./telegram/telegrambot');
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
await telegrambot.sendMsgTelegram(tools.FREEPLANET, telegrambot.ADMIN_USER_SERVER, `Ciao ${telegrambot.ADMIN_USER_NAME_SERVER}!`);
|
||||
@@ -420,6 +424,43 @@ async function faitest() {
|
||||
console.log('ris', ris);
|
||||
}
|
||||
|
||||
if (false) {
|
||||
|
||||
const { User } = require('./models/user');
|
||||
|
||||
const idapp = tools.FREEPLANET;
|
||||
const idreg = 0;
|
||||
|
||||
try {
|
||||
|
||||
const user = await User.findOne({
|
||||
idapp,
|
||||
username: 'paoloar773',
|
||||
});
|
||||
|
||||
user.aportador_solidario = 'paoloar77';
|
||||
|
||||
let mylocalsconf = {
|
||||
idapp,
|
||||
dataemail: null,
|
||||
locale: user.lang,
|
||||
nomeapp: tools.getNomeAppByIdApp(idapp),
|
||||
strlinksito: tools.getHostByIdApp(idapp),
|
||||
strlinkreg: '',
|
||||
username: user.username,
|
||||
name: user.name,
|
||||
surname: user.surname,
|
||||
forgetpwd: tools.getHostByIdApp(idapp) + '/requestresetpwd',
|
||||
emailto: '',
|
||||
user,
|
||||
};
|
||||
|
||||
await telegrambot.notifyToTelegram(telegrambot.phase.REGISTRATION,
|
||||
mylocalsconf);
|
||||
} catch (e) {
|
||||
console.log('error ' + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { app };
|
||||
|
||||
Reference in New Issue
Block a user