- Cataloghi aggiornamento...

This commit is contained in:
Surya Paolo
2025-02-11 18:57:57 +01:00
parent f674791dbc
commit b643c7cdc3
7 changed files with 88 additions and 13 deletions

View File

@@ -37,7 +37,7 @@ var Collana = module.exports = mongoose.model('Collana', CollanaSchema);
module.exports.getFieldsForSearch = function () {
return [
{ field: 'descrizione', type: tools.FieldType.string },
{ field: 'title', type: tools.FieldType.string },
]
};
@@ -49,7 +49,7 @@ module.exports.executeQueryTable = function (idapp, params) {
module.exports.findAllIdApp = async function (idapp) {
const myfind = { idapp };
return await Collana.find(myfind).sort({descrizione: 1});
return await Collana.find(myfind).sort({title: 1}).lean();
};
module.exports.createIndexes((err) => {