(body, factory)
| 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. |