@tiledesk/tiledesk-server 2.4.40 → 2.4.41
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/package.json +2 -2
- package/routes/faq.js +0 -12
- package/routes/faq_kb.js +0 -1
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.41",
|
|
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.89",
|
|
48
|
-
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.
|
|
48
|
+
"@tiledesk/tiledesk-whatsapp-connector": "^0.1.51",
|
|
49
49
|
"amqplib": "^0.5.5",
|
|
50
50
|
"app-root-path": "^3.0.0",
|
|
51
51
|
"bcrypt-nodejs": "0.0.3",
|
package/routes/faq.js
CHANGED
|
@@ -28,7 +28,6 @@ router.post('/uploadcsv', upload.single('uploadFile'), function (req, res, next)
|
|
|
28
28
|
winston.debug('delimiter: ' + delimiter);
|
|
29
29
|
|
|
30
30
|
var csv = req.file.buffer.toString('utf8');
|
|
31
|
-
console.log("--> csv: ", csv)
|
|
32
31
|
// winston.debug(' -> CSV STRING ', csv);
|
|
33
32
|
|
|
34
33
|
// res.json({ success: true, msg: 'Importing CSV...' });
|
|
@@ -52,8 +51,6 @@ router.post('/uploadcsv', upload.single('uploadFile'), function (req, res, next)
|
|
|
52
51
|
.on("data", function (data) {
|
|
53
52
|
winston.debug('PARSED CSV ', data);
|
|
54
53
|
|
|
55
|
-
console.log('--> PARSED CSV ', data);
|
|
56
|
-
|
|
57
54
|
var question = data[0]
|
|
58
55
|
//var answer = data[1]
|
|
59
56
|
var intent_id = data[2];
|
|
@@ -107,8 +104,6 @@ router.post('/uploadcsv', upload.single('uploadFile'), function (req, res, next)
|
|
|
107
104
|
updatedBy: req.user.id
|
|
108
105
|
});
|
|
109
106
|
|
|
110
|
-
console.log("--> newFaq: ", JSON.stringify(newFaq, null, 2));
|
|
111
|
-
|
|
112
107
|
newFaq.save(function (err, savedFaq) {
|
|
113
108
|
if (err) {
|
|
114
109
|
winston.error('--- > ERROR uploadcsv', err)
|
|
@@ -199,7 +194,6 @@ router.post('/', function (req, res) {
|
|
|
199
194
|
|
|
200
195
|
router.patch('/:faqid/attributes', function (req, res) {
|
|
201
196
|
let data = req.body;
|
|
202
|
-
console.log("data: ", data);
|
|
203
197
|
|
|
204
198
|
Faq.findById(req.params.faqid, function (err, updatedFaq) {
|
|
205
199
|
if (err) {
|
|
@@ -212,7 +206,6 @@ router.patch('/:faqid/attributes', function (req, res) {
|
|
|
212
206
|
}
|
|
213
207
|
|
|
214
208
|
if (!updatedFaq.attributes) {
|
|
215
|
-
console.log("empty attributes");
|
|
216
209
|
winston.debug("empty attributes");
|
|
217
210
|
updatedFaq.attributes = {};
|
|
218
211
|
}
|
|
@@ -225,9 +218,6 @@ router.patch('/:faqid/attributes', function (req, res) {
|
|
|
225
218
|
updatedFaq.attributes[key] = val;
|
|
226
219
|
})
|
|
227
220
|
|
|
228
|
-
console.log("updatedFaq: ", updatedFaq);
|
|
229
|
-
console.log("updatedFaq attributes: ", updatedFaq.attributes);
|
|
230
|
-
|
|
231
221
|
winston.debug("updatedBot attributes", updatedFaq.attributes)
|
|
232
222
|
|
|
233
223
|
updatedFaq.markModified('attributes');
|
|
@@ -239,8 +229,6 @@ router.patch('/:faqid/attributes', function (req, res) {
|
|
|
239
229
|
return res.status(500).send({ success: false, msg: 'Error saving object.' });
|
|
240
230
|
}
|
|
241
231
|
|
|
242
|
-
console.log("saved faq attributes", savedFaq.toObject());
|
|
243
|
-
|
|
244
232
|
winston.verbose("saved faq attributes", savedFaq.toObject());
|
|
245
233
|
faqBotEvent.emit('faq.update', savedFaq);
|
|
246
234
|
res.json(savedFaq);
|
package/routes/faq_kb.js
CHANGED
|
@@ -363,7 +363,6 @@ router.put('/:faq_kbid/language/:language', (req, res) => {
|
|
|
363
363
|
botEvent.emit('faqbot.update', updatedFaq_kb);
|
|
364
364
|
return res.status(500).send({ success: false, msg: 'Error updating multiple object.' });
|
|
365
365
|
}
|
|
366
|
-
console.log("updateMany intents result: ", result)
|
|
367
366
|
return res.status(200).send(updatedFaq_kb)
|
|
368
367
|
})
|
|
369
368
|
|