(triggerType, auth, query, count, config, context, isGet)
| 332 | } |
| 333 | |
| 334 | export 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 |
no outgoing calls
no test coverage detected