Skip to content

Commit

Permalink
split up transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed May 3, 2024
1 parent c1bb7f6 commit fecbe00
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,20 @@ Mark.updateMarksLabel = function(req, res, next) {
};

Mark.pointList = function(req, res, next) {
var query = req.query;
delete query.token;
mongoDB.find("camic", 'mark', query, { x: 1, y: 1, _id: 0 }).toArray().then((points) => {
req.data = { points: points.map(point => [point.x, point.y]) };
var query = req.query;
delete query.token;
var points = [];

Check failure on line 355 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Trailing spaces not allowed

Check failure on line 355 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Trailing spaces not allowed
mongoDB.find("camic", 'mark', query, { x: 1, y: 1, _id: 0 }).forEach((doc) => {

Check failure on line 356 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 356 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 356 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 356 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

There should be no space before '}'
points.push([doc.x, doc.y]);

Check failure on line 357 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 357 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 4 spaces but found 6
}).then(() => {
req.data = { points: points };

Check failure on line 359 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 359 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 359 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 359 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 359 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 359 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 360 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 360 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));
}).catch((e) => next(e));
};



Check failure on line 365 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

More than 2 blank lines not allowed

Check failure on line 365 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

More than 2 blank lines not allowed
var Heatmap = {};
Heatmap.types = function(req, res, next) {
var query = req.query;
Expand Down

0 comments on commit fecbe00

Please sign in to comment.