- catalogo

- corretto logica del RefreshToken che non richiedeva il nuovo token, quindi scadeva tutte le volte, richiedendo sempre l'accesso !
This commit is contained in:
Surya Paolo
2025-01-07 16:50:55 +01:00
parent 7f6ed73763
commit 9fb7df56e6
24 changed files with 1199 additions and 59 deletions

View File

@@ -119,6 +119,7 @@ const productInfoSchema = new Schema({
type: String,
},
idAuthors: [{ type: Schema.Types.ObjectId, ref: 'Author' }],
idCollana: { type: Schema.Types.ObjectId, ref: 'Collana' },
idPublisher: { type: Schema.Types.ObjectId, ref: 'Publisher' },
collezione: {
type: String,
@@ -138,7 +139,9 @@ const productInfoSchema = new Schema({
},
totVen: Number,
totFat: Number,
vLast3M: Number,
fatLast3M: Number,
vLast6M: Number,
vLastY: Number,
vLast2Y: Number,
@@ -218,6 +221,14 @@ module.exports.findAllIdApp = async function (idapp, code, id) {
as: 'authors'
}
},
{
$lookup: {
from: 'collanas',
localField: 'idCollana',
foreignField: '_id',
as: 'collana'
}
},
{
$lookup: {
from: 'publishers',