Skip to content

Commit

Permalink
in case token passed through url
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed May 3, 2024
1 parent d61f46e commit c888f08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var General = {};
General.find = function(db, collection) {
return function(req, res, next) {
var query = req.query;
delete query.token;
mongoDB.find(db, collection, query).then((x) => {
req.data = x;
next();
Expand All @@ -16,6 +17,7 @@ General.find = function(db, collection) {
General.paginatedFind = function(db, collection) {
return function(req, res, next) {
var query = req.query;
delete query.token;
mongoDB.paginatedFind(db, collection, query).then((x) => {
req.data = x;
next();
Expand Down Expand Up @@ -348,6 +350,7 @@ Mark.updateMarksLabel = function(req, res, next) {

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

Check failure on line 352 in handlers/dataHandlers.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Expected indentation of 2 spaces but found 4
delete query.token;

Check failure on line 353 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("camic", 'mark', query, { x: 1, y: 1, _id: 0 }).toArray().then((points) => {

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

View workflow job for this annotation

GitHub Actions / build (20.x)

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

0 comments on commit c888f08

Please sign in to comment.