Skip to content

Commit

Permalink
try another syntax?
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed May 3, 2024
1 parent fecbe00 commit cdeff6c
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,20 @@ Mark.pointList = function(req, res, next) {
var query = req.query;
delete query.token;
var points = [];

mongoDB.find("camic", 'mark', query, { x: 1, y: 1, _id: 0 }).forEach((doc) => {
points.push([doc.x, doc.y]);
}).then(() => {
req.data = { points: points };
next();
}).catch((e) => next(e));

var cursor = mongoDB.find("camic", 'mark', query, { x: 1, y: 1, _id: 0 });

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 '}'

cursor.each((err, doc) => {
if (err) {

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 (20.x)

Expected indentation of 4 spaces but found 6
return next(err);

Check failure on line 360 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 6 spaces but found 10

Check failure on line 360 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 6 spaces but found 10
}

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

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 4 spaces but found 6
if (doc) {

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

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 4 spaces but found 6
points.push([doc.x, doc.y]);

Check failure on line 363 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 6 spaces but found 10

Check failure on line 363 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 6 spaces but found 10
} else {

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

View workflow job for this annotation

GitHub Actions / build (20.x)

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

Check failure on line 365 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Expected indentation of 6 spaces but found 10

Check failure on line 365 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 6 spaces but found 10
next();
}
});
};


Expand Down

0 comments on commit cdeff6c

Please sign in to comment.