"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildNormalizeRouter = buildNormalizeRouter;
const express_1 = require("express");
const http_1 = require("../utils/http");
function buildNormalizeRouter(services) {
    const router = (0, express_1.Router)();
    router.post("/api/normalize", async (req, res, next) => {
        try {
            const payload = req.body;
            const result = await services.normalizerService.normalize(payload);
            (0, http_1.ok)(res, result);
        }
        catch (error) {
            next(error);
        }
    });
    return router;
}
