MCPcopy
hub / github.com/parse-community/parse-server / handleCreate

Method handleCreate

src/Routers/ClassesRouter.js:113–129  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

111 }
112
113 handleCreate(req) {
114 if (
115 this.className(req) === '_User' &&
116 typeof req.body?.objectId === 'string' &&
117 req.body.objectId.startsWith('role:')
118 ) {
119 throw createSanitizedError(Parse.Error.OPERATION_FORBIDDEN, 'Invalid object ID.', req.config);
120 }
121 return rest.create(
122 req.config,
123 req.auth,
124 this.className(req),
125 req.body || {},
126 req.info.clientSDK,
127 req.info.context
128 );
129 }
130
131 handleUpdate(req) {
132 const where = { objectId: req.params.objectId };

Callers 6

mountRoutesMethod · 0.95
mountRoutesMethod · 0.80
mountRoutesMethod · 0.80
mountRoutesMethod · 0.80
mountRoutesMethod · 0.80
mountRoutesMethod · 0.80

Calls 3

classNameMethod · 0.95
createSanitizedErrorFunction · 0.90
createMethod · 0.80

Tested by

no test coverage detected