MCPcopy Index your code
hub / github.com/parse-community/parse-server / getRequestQueryObject

Function getRequestQueryObject

src/triggers.js:334–367  ·  view source on GitHub ↗
(triggerType, auth, query, count, config, context, isGet)

Source from the content-addressed store, hash-verified

332}
333
334export function getRequestQueryObject(triggerType, auth, query, count, config, context, isGet) {
335 isGet = !!isGet;
336
337 var request = {
338 triggerName: triggerType,
339 query,
340 master: false,
341 isReadOnly: false,
342 count,
343 log: config.loggerController,
344 isGet,
345 headers: config.headers,
346 ip: config.ip,
347 context: context || {},
348 config,
349 };
350
351 if (!auth) {
352 return request;
353 }
354 if (auth.isMaster) {
355 request['master'] = true;
356 }
357 if (auth.isReadOnly) {
358 request['isReadOnly'] = true;
359 }
360 if (auth.user) {
361 request['user'] = auth.user;
362 }
363 if (auth.installationId) {
364 request['installationId'] = auth.installationId;
365 }
366 return request;
367}
368
369// Creates the response object, and uses the request object to pass data
370// The API will call this with REST API formatted objects, this will

Callers 1

maybeRunQueryTriggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected