summer-glove
Version:
[](https://www.npmjs.com/package/summer-glove) ## Fit like a glove 🧤 Summer-glove is a route manager, providing a quick and easy way to configure an express application. Summer-glo
19 lines (18 loc) • 948 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ExpressInformationCore_1 = __importDefault(require("../core/ExpressInformationCore"));
const loggerUtil_1 = require("./loggerUtil");
const LoggerInformationCore_1 = __importDefault(require("../core/LoggerInformationCore"));
function verifyControllerConflicts(controllerName) {
const controllerPath = ExpressInformationCore_1.default.getInstance().getObjectConfig().controllers[controllerName];
if (controllerPath) {
LoggerInformationCore_1.default.getInstance().getObjectConfig().loggersQueue.push({
message: `The controller ${controllerName} has already been mapped.`,
callback: loggerUtil_1.printWarn
});
}
}
exports.default = verifyControllerConflicts;