@tiledesk/tiledesk-server 2.4.10 → 2.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/faq_kb.js +13 -0
- package/package.json +2 -2
- package/routes/faq_kb.js +12 -0
package/models/faq_kb.js
CHANGED
|
@@ -2,6 +2,7 @@ var mongoose = require('mongoose');
|
|
|
2
2
|
var Schema = mongoose.Schema;
|
|
3
3
|
const uuidv4 = require('uuid/v4');
|
|
4
4
|
var winston = require('../config/winston');
|
|
5
|
+
const { stringify } = require('uuid');
|
|
5
6
|
|
|
6
7
|
var defaultFullTextLanguage = process.env.DEFAULT_FULLTEXT_INDEX_LANGUAGE || "none";
|
|
7
8
|
|
|
@@ -109,6 +110,18 @@ var Faq_kbSchema = new Schema({
|
|
|
109
110
|
type: Boolean,
|
|
110
111
|
default: true
|
|
111
112
|
},
|
|
113
|
+
short_description: {
|
|
114
|
+
type: String,
|
|
115
|
+
required: false
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
type: String,
|
|
119
|
+
required: false
|
|
120
|
+
},
|
|
121
|
+
certifiedTags: {
|
|
122
|
+
type: Array,
|
|
123
|
+
required: false
|
|
124
|
+
}
|
|
112
125
|
},{
|
|
113
126
|
timestamps: true
|
|
114
127
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiledesk/tiledesk-server",
|
|
3
3
|
"description": "The Tiledesk server module",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.11",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "node ./bin/www",
|
|
7
7
|
"pretest": "mongodb-runner start",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@tiledesk/tiledesk-messenger-connector": "0.1.9",
|
|
46
46
|
"@tiledesk/tiledesk-rasa-connector": "^1.0.10",
|
|
47
47
|
"@tiledesk/tiledesk-tybot-connector": "^0.1.78",
|
|
48
|
-
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.
|
|
48
|
+
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.48",
|
|
49
49
|
"amqplib": "^0.5.5",
|
|
50
50
|
"app-root-path": "^3.0.0",
|
|
51
51
|
"bcrypt-nodejs": "0.0.3",
|
package/routes/faq_kb.js
CHANGED
|
@@ -316,6 +316,18 @@ router.put('/:faq_kbid', function (req, res) {
|
|
|
316
316
|
if (req.body.trained != undefined) {
|
|
317
317
|
update.trained = req.body.trained;
|
|
318
318
|
}
|
|
319
|
+
|
|
320
|
+
if (req.body.short_description != undefined) {
|
|
321
|
+
update.short_description = req.body.short_description
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (req.body.title != undefined) {
|
|
325
|
+
update.title = req.body.title
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (req.body.certifiedTags != undefined) {
|
|
329
|
+
update.certifiedTags = req.body.certifiedTags
|
|
330
|
+
}
|
|
319
331
|
// update._id = req.params.faq_kbid;
|
|
320
332
|
|
|
321
333
|
winston.debug("update", update);
|