MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / _fetchId

Method _fetchId

lib/helper/ApiDataFactory.js:350–357  ·  view source on GitHub ↗
(body, factory)

Source from the content-addressed store, hash-verified

348 }
349
350 _fetchId(body, factory) {
351 if (this.config.factories[factory].fetchId) {
352 return this.config.factories[factory].fetchId(body)
353 }
354 if (body.id) return body.id
355 if (body[factory] && body[factory].id) return body[factory].id
356 return null
357 }
358
359 /**
360 * Executes request to create a record in API.

Callers 1

_requestCreateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected