import products dinamically

This commit is contained in:
Surya Paolo
2024-02-06 20:12:54 +01:00
parent 9fe81713e5
commit 64bd3cebb3
13 changed files with 577 additions and 32 deletions

View File

@@ -711,15 +711,18 @@ const MyTelegramBot = {
} else {
arrTeleg = appTelegram;
}
if (process.env.NODE_ENV === 'development')
if (process.env.NODE_ENV === 'development') {
arrTeleg = appTelegram_DEVELOP;
else if (process.env.NODE_ENV === 'test')
} else if (process.env.NODE_ENV === 'test') {
arrTeleg = MyTelegramBot.getAppTelegramTest();
} else {
const arrTelegFromSite = tools.getArrTelegramFromSite();
if (arrTelegFromSite.length > 0) {
arrTeleg = arrTelegFromSite;
}
const arrTelegFromSite = tools.getArrTelegramFromSite();
if (arrTelegFromSite.length > 0) {
arrTeleg = arrTelegFromSite;
}
return arrTeleg;
},
@@ -3927,7 +3930,7 @@ class Telegram {
user_profile.then(function (res) {
if (res.total_count === 0) {
// Non ho l'accesso oppure sono davvero senza foto !
}
if (res.photos[0]) {
var file_id = res.photos[0][2].file_id;
@@ -4100,7 +4103,7 @@ if (true) {
internetAvailable().then(() => {
// ..
console.log('TELEGRAM STARTING.... ' + process.env.NODE_ENV);
console.log('TELEGRAM STARTING.... ', process.env.NODE_ENV);
for (const idapp of arrTeleg) {