Skip to main content

Module classes

Module classes 

Source
Expand description

The five /classes verbs, and the cores every other class-shaped route reuses.

Upstream: src/Routers/ClassesRouter.js. Response shapes are wire contract and narrower than they look: a create returns {objectId, createdAt}, an update returns {updatedAt}, and a delete returns {}. Returning the whole object would be more helpful and would not match.

RolesRouter and SessionsRouter are ClassesRouter with className() pinned (RolesRouter.js:4-6, SessionsRouter.js:8-10), so they call the cores below with a fixed class name rather than reimplementing them. /batch dispatches into the same cores, which is what makes a sub-request and a top-level request the same code path rather than two that drift.

Constants§

SESSION_CLASS
The class sessions live in.

Functions§

body_of
Convert a Parse-format map into a JSON response body.
create_core
delete_core
delete_session_core
DELETE /sessions/:objectId, which is narrower than an ordinary class delete.
find_core
get_core
update_core