@tiledesk/tiledesk-server 2.10.10 → 2.10.11

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -5,9 +5,10 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
- # 2.10.10
8
+ # 2.10.11
9
9
  - Updated tybot-connector to 0.2.118
10
10
  - Removed logs
11
+ - Removed $clusterTime from add kb response
11
12
 
12
13
  # 2.10.9
13
14
  - Removed logs
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.10.10",
4
+ "version": "2.10.11",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
package/routes/kb.js CHANGED
@@ -521,8 +521,8 @@ router.get('/namespace/:id/chunks/:content_id', async (req, res) => {
521
521
  return res.status(200).send(chunks);
522
522
 
523
523
  }).catch((err) => {
524
- console.log("error getting content chunks err.response: ", err.response)
525
- console.log("error getting content chunks err.data: ", err.data)
524
+ console.error("error getting content chunks err.response: ", err.response)
525
+ console.error("error getting content chunks err.data: ", err.data)
526
526
  return res.status(500).send({ success: false, error: err });
527
527
  })
528
528
 
@@ -961,6 +961,9 @@ router.post('/', async (req, res) => {
961
961
  }
962
962
  else {
963
963
 
964
+ delete raw.ok;
965
+ delete raw.$clusterTime;
966
+ delete raw.operationTime;
964
967
  res.status(200).send(raw);
965
968
 
966
969
  let saved_kb = raw.value;
@@ -1105,8 +1108,6 @@ router.post('/multi', upload.single('uploadFile'), async (req, res) => {
1105
1108
  }
1106
1109
  })
1107
1110
 
1108
- console.log("kbs: ", kbs);
1109
-
1110
1111
  saveBulk(operations, kbs, project_id).then((result) => {
1111
1112
 
1112
1113
  let ns = namespaces.find(n => n.id === namespace_id);
@@ -1116,7 +1117,6 @@ router.post('/multi', upload.single('uploadFile'), async (req, res) => {
1116
1117
  resources = resources.map(({ _id, scrape_options, ...rest }) => {
1117
1118
  return { id: _id, webhook: webhook, parameters_scrape_type_4: scrape_options, engine: engine, ...rest}
1118
1119
  });
1119
- console.log("resources to be sent to worker: ", resources);
1120
1120
  winston.verbose("resources to be sent to worker: ", resources);
1121
1121
 
1122
1122
  scheduleScrape(resources);
@@ -1183,7 +1183,6 @@ router.post('/csv', upload.single('uploadFile'), async (req, res) => {
1183
1183
  let question = data[0];
1184
1184
  let answer = data[1];
1185
1185
 
1186
- console.log("data. ", data)
1187
1186
  kbs.push({
1188
1187
  id_project: project_id,
1189
1188
  name: question,