Skip to content

Commit

Permalink
add a route for point summary of marks
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed May 3, 2024
1 parent 7209034 commit cae45b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caracal.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ var HANDLERS = {
"markSegmentationCount": function() {
return dataHandlers.Mark.segmentationCountByExecid;
},
"markPointList": function(){

Check failure on line 109 in caracal.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Missing space before opening brace

Check failure on line 109 in caracal.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing space before opening brace
return Mark.pointList;
},
"findMarkTypes": function() {
return dataHandlers.Mark.findMarkTypes;
},
Expand Down
10 changes: 10 additions & 0 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,16 @@ Mark.updateMarksLabel = function(req, res, next) {
next();
}).catch((e) => next(e));
};

Mark.pointList = function(req, res, next) {
var query = req.query;

Check failure on line 350 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 2 spaces but found 4

Check failure on line 350 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 2 spaces but found 4
mongoDB.find(db, 'mark', query, { x: 1, y: 1, _id: 0 }).toArray().then((points) => {

Check failure on line 351 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 2 spaces but found 4

Check failure on line 351 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

There should be no space after '{'

Check failure on line 351 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

There should be no space before '}'

Check failure on line 351 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 2 spaces but found 4

Check failure on line 351 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

There should be no space after '{'

Check failure on line 351 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

There should be no space before '}'
req.data = { points: points.map(point => [point.x, point.y]) };

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 4 spaces but found 6

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

There should be no space after '{'

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected parentheses around arrow function argument

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

There should be no space before '}'

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 4 spaces but found 6

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

There should be no space after '{'

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected parentheses around arrow function argument

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

There should be no space before '}'
next();

Check failure on line 353 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 4 spaces but found 6

Check failure on line 353 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 4 spaces but found 6
}).catch((e) => next(e));
};


var Heatmap = {};
Heatmap.types = function(req, res, next) {
var query = req.query;
Expand Down

0 comments on commit cae45b3

Please sign in to comment.