@elsikora/nestjs-crud-automator
Version:
A library for automating the creation of CRUD operations in NestJS.
19 lines (15 loc) • 732 B
JavaScript
;
var exception_utility = require('../../../error/exception.utility.js');
/**
* Prevents low-level controller facades from silently ignoring an uncompiled read scope.
* @param {object} routeConfig - Route configuration supplied to the facade.
* @param {IApiControllerReadPlan} [readPlan] - Factory-compiled read plan.
* @returns {void}
*/
function ApiControllerReadPlanAssert(routeConfig, readPlan) {
if (Reflect.has(routeConfig, "read") && !readPlan) {
throw exception_utility.ErrorException("Generated read configuration requires compilation by the @ApiController factory");
}
}
exports.ApiControllerReadPlanAssert = ApiControllerReadPlanAssert;
//# sourceMappingURL=assert-plan.utility.js.map