@tiledesk/tiledesk-server 2.2.18 → 2.2.20

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 2.2.19
2
+ - disabled waiting time in widgets endpoint unused
3
+
1
4
  # 2.2.18
2
5
  - Router logger module enable with ROUTELOGGER_ENABLED=true
3
6
 
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.18",
4
+ "version": "2.2.20",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
@@ -11,27 +11,29 @@ var winston = require('../config/winston');
11
11
  //winston.debug(req.params);
12
12
  //winston.debug("req.projectid", req.projectid);
13
13
 
14
- AnalyticResult.aggregate([
15
- //last 4
16
- { $match: {"id_project":req.projectid, "createdAt" : { $gte : new Date((new Date().getTime() - (4 * 60 * 60 * 1000))) }} },
17
- { "$group": {
18
- "_id": "$id_project",
19
- "waiting_time_avg":{"$avg": "$waiting_time"}
20
- }
21
- },
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
+ // },
22
24
 
23
- ])
24
- // .cache(cacheUtil.longTTL, req.projectid+":analytics:query:waiting:avg:4hours")
25
- .exec(function(err, result) {
26
-
27
- if (err) {
28
- winston.debug(err);
29
- return res.status(500).send({success: false, msg: 'Error getting analytics.'});
30
- }
31
- //winston.debug(result);
32
-
33
- res.json(result);
34
- });
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
+ // });
35
37
 
36
38
  });
37
39
 
package/routes/widget.js CHANGED
@@ -123,7 +123,7 @@ router.get('/', function(req, res, next) {
123
123
  ,
124
124
  getDepartments(req)
125
125
  ,
126
- waiting()
126
+ // waiting()unused used 620e87f02e7fda00350ea5a5/publicanalytics/waiting/current
127
127
  ,
128
128
  getIp()
129
129