- Aggiornamento QUASAR
This commit is contained in:
Surya Paolo
2025-02-06 19:00:02 +01:00
parent 2f92dfe5b0
commit 3e9ab0af53
9 changed files with 154 additions and 14 deletions

View File

@@ -13,12 +13,12 @@ mongoose.plugin(schema => {
});
const CatAISchema = new Schema({
_id: {
type: Number,
},
name: {
type: String,
},
idapp: {
type: String,
},
img: {
type: String,
},
@@ -47,7 +47,7 @@ CatAISchema.statics.executeQueryTable = function (idapp, params) {
};
CatAISchema.statics.findAllIdApp = async function (idapp) {
const myfind = {};
const myfind = { idapp };
return await CatAI.find(myfind).sort({ name: 1 });
};

View File

@@ -15,6 +15,8 @@ mongoose.plugin(schema => {
schema.options.usePushEach = true
});
const OpenAI = require("openai");
const QueryAISchema = new Schema({
idapp: {
type: String,
@@ -73,7 +75,7 @@ QueryAISchema.statics.getFieldsForSearch = function () {
QueryAISchema.statics.executeQueryTable = function (idapp, params) {
params.fieldsearch = this.getFieldsForSearch();
return tools.executeQueryTable(this, 0, params);
return tools.executeQueryTable(this, idapp, params);
};