@tiledesk/tiledesk-server 2.2.20 → 2.2.23

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,21 @@
1
- # 2.2.19
1
+ # 2.2.23 -> PROD
2
+ - Increased list answers limit from 1000 to 3000
3
+
4
+ # 2.2.22
5
+ - Increased list answers limit from 300 to 1000
6
+
7
+ # 2.2.21
8
+ - Increased list answers limit from 100 to 300
9
+ - enabled again waiting time in widgets endpoint unused
10
+
11
+
12
+ # 2.2.20
2
13
  - disabled waiting time in widgets endpoint unused
3
14
 
4
15
  # 2.2.18
5
16
  - Router logger module enable with ROUTELOGGER_ENABLED=true
6
17
 
7
-
8
- # 2.2.17 -> PROD
18
+ # 2.2.17
9
19
  - Removed default fallback limit on parse reply
10
20
 
11
21
  # 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.23",
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 = 3000; // 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