@tiledesk/tiledesk-server 2.2.20 → 2.2.21

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,15 @@
1
- # 2.2.19
1
+ # 2.2.21 -> PROD
2
+ - Increased list answers limit from 100 to 300
3
+ - enabled again waiting time in widgets endpoint unused
4
+
5
+
6
+ # 2.2.20
2
7
  - disabled waiting time in widgets endpoint unused
3
8
 
4
9
  # 2.2.18
5
10
  - Router logger module enable with ROUTELOGGER_ENABLED=true
6
11
 
7
-
8
- # 2.2.17 -> PROD
12
+ # 2.2.17
9
13
  - Removed default fallback limit on parse reply
10
14
 
11
15
  # 2.2.16
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.2.20",
4
+ "version": "2.2.21",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
package/routes/faq.js CHANGED
@@ -273,7 +273,7 @@ router.get('/', function (req, res, next) {
273
273
  query.id_faq_kb = req.query.id_faq_kb;
274
274
  }
275
275
 
276
- var limit = 100; // Number of request per page
276
+ var limit = 300; // Number of request per page
277
277
 
278
278
  if (req.query.limit) {
279
279
  limit = parseInt(req.query.limit);
@@ -11,29 +11,30 @@ var winston = require('../config/winston');
11
11
  //winston.debug(req.params);
12
12
  //winston.debug("req.projectid", req.projectid);
13
13
 
14
- res.json([]);
15
-
16
- // AnalyticResult.aggregate([
17
- // //last 4
18
- // { $match: {"id_project":req.projectid, "createdAt" : { $gte : new Date((new Date().getTime() - (4 * 60 * 60 * 1000))) }} },
19
- // { "$group": {
20
- // "_id": "$id_project",
21
- // "waiting_time_avg":{"$avg": "$waiting_time"}
22
- // }
23
- // },
14
+ // res.json([]);
15
+
16
+
17
+ AnalyticResult.aggregate([
18
+ //last 4
19
+ { $match: {"id_project":req.projectid, "createdAt" : { $gte : new Date((new Date().getTime() - (4 * 60 * 60 * 1000))) }} },
20
+ { "$group": {
21
+ "_id": "$id_project",
22
+ "waiting_time_avg":{"$avg": "$waiting_time"}
23
+ }
24
+ },
24
25
 
25
- // ])
26
- // // .cache(cacheUtil.longTTL, req.projectid+":analytics:query:waiting:avg:4hours")
27
- // .exec(function(err, result) {
28
-
29
- // if (err) {
30
- // winston.debug(err);
31
- // return res.status(500).send({success: false, msg: 'Error getting analytics.'});
32
- // }
33
- // //winston.debug(result);
34
-
35
- // res.json(result);
36
- // });
26
+ ])
27
+ // .cache(cacheUtil.longTTL, req.projectid+":analytics:query:waiting:avg:4hours")
28
+ .exec(function(err, result) {
29
+
30
+ if (err) {
31
+ winston.debug(err);
32
+ return res.status(500).send({success: false, msg: 'Error getting analytics.'});
33
+ }
34
+ //winston.debug(result);
35
+
36
+ res.json(result);
37
+ });
37
38
 
38
39
  });
39
40