- AI
- Aggiornamento QUASAR
This commit is contained in:
@@ -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 });
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user