ver: 1.1.21:
- Lista dei Cataloghi - Gestione Cataloghi in base alla configurazione
This commit is contained in:
26
src/server/populate/catalogs.js
Normal file
26
src/server/populate/catalogs.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const { ObjectId } = require('mongodb');
|
||||
|
||||
module.exports = {
|
||||
list: [
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a1'), idapp: '18', title: 'Alimentazione Sana' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a2'), idapp: '18', title: 'Attualità e Informazione Libera' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a3'), idapp: '18', title: 'Psicologia e Crescita Personale' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a4'), idapp: '18', title: 'Educazione e Formazione' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a5'), idapp: '18', title: 'Bambini e Ragazzi Felici' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a6'), idapp: '18', title: 'Salute e Benessere Naturali' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a7'), idapp: '18', title: 'Nuove Scienze' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a8'), idapp: '18', title: 'Spiritualità e Sciamanesimo' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4a9'), idapp: '18', title: 'Storia e Archeologia Segreta' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4aa'), idapp: '18', title: 'Autosufficienza, Autoproduzione e Vita Naturale' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4ab'), idapp: '18', title: 'Yoga' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4ac'), idapp: '18', title: 'Amici Animali' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4ad'), idapp: '18', title: 'Corpi Energetici' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4ae'), idapp: '18', title: 'Erbe, Alberi e Natura' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4af'), idapp: '18', title: 'Astrologia, Esoterismi e Numerologia' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4b0'), idapp: '18', title: 'Universo Femminile' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4b1'), idapp: '18', title: 'Sessualità e Relazione di coppia' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4b2'), idapp: '18', title: 'Tarocchi, Oracoli e Carte' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4b3'), idapp: '18', title: 'Techiche per il corpo' },
|
||||
{ _id: ObjectId('605c72e2f9b1a019c1e4f4b4'), idapp: '18', title: 'Antroposofia' },
|
||||
],
|
||||
};
|
||||
@@ -81,7 +81,7 @@ module.exports = {
|
||||
numupdated++;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error processing record:', e);
|
||||
console.log('Error processing record: ', tablename, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,12 @@ module.exports = {
|
||||
if (rec.table === 'contribtypes') {
|
||||
attiva = scrivi_contribtype;
|
||||
}
|
||||
await this.insertIntoDb_NoDuplicate(attiva, rec.table, mytable, rec.key, rec.key2);
|
||||
|
||||
if (mytable) {
|
||||
await this.insertIntoDb_NoDuplicate(attiva, rec.table, mytable, rec.key, rec.key2);
|
||||
} else {
|
||||
console.error('Tabella ', mytable, ' non esistente!')
|
||||
}
|
||||
}
|
||||
|
||||
console.log('FINE - popolaTabelleNuove');
|
||||
|
||||
Reference in New Issue
Block a user