UNPKG

json-api-nestjs

Version:
16 lines 585 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.postOne = postOne; async function postOne(inputData) { const { attributes, relationships, id } = inputData; const idObject = id ? { [this.microOrmUtilService.currentPrimaryColumn.toString()]: id } : {}; const attributesObject = { ...attributes, ...idObject, }; const entityIns = this.microOrmUtilService.createEntity(attributesObject); return this.microOrmUtilService.saveEntity(entityIns, relationships); } //# sourceMappingURL=post-one.js.map