Closed
Description
Issue Description
I am having issues with the isGet parameter in the beforeFind trigger. While my query is definitely a .get isGet does not seem to be set correctly.
- When I run the following command in the front-end
(new Parse.Query('BusinessUnit')).get('HlNbtoSUiR')
the parse-js-sdk creates a POST request tohttp://localhost:1337/parse/classes/BusinessUnit
. - This triggers
handleFind
(nothandleGet
) inClassesRouter.js
in the back-end. This is likely because handleGet expects a route with the following format/classes/:className/:objectId
but as the get in the frontend uses .first it ends up calling/classes/:className
ClassesRouter.js
then triggers find() inrest.js
which in turn calls thebeforeFind
trigger withisGet
set to false
Relevant files:
https://github.com/parse-community/Parse-SDK-JS/blob/master/src/ParseQuery.js
https://github.com/parse-community/parse-server/blob/master/src/Routers/ClassesRouter.js
https://github.com/parse-community/parse-server/blob/master/src/rest.js
Steps to reproduce
Run any query.get command and look at the network tab
Expected Results
A .get query in the frontend GETs on /classes/:className/:objectId
Actual Outcome
A .get query in the frontend POSTs on /classes/:className
(the POST vs GET bit is probably fine, but the route seems off)
Metadata
Metadata
Assignees
Labels
No labels