UNPKG

intlayer-editor

Version:

Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.

33 lines (31 loc) 907 B
import { formatResponse } from "../utils/responseData.mjs"; import { getConfiguration as getConfiguration$1 } from "@intlayer/config"; //#region src/controllers/configuration.controller.ts /** * Get the Intlayer configuration */ const getConfiguration = async (_req, res, _next) => { try { const formattedResponse = formatResponse({ data: getConfiguration$1() }); res.json(formattedResponse); return; } catch (err) { const errorMessage = err ?? { message: "Internal Server Error", status: 500 }; const formattedErrorResponse = formatResponse({ error: { message: errorMessage.message ?? "Internal Server Error", code: "INTERNAL_SERVER_ERROR", title: "Internal Server Error" }, status: errorMessage.status ?? 500 }); res.json(formattedErrorResponse); return; } }; //#endregion export { getConfiguration }; //# sourceMappingURL=configuration.controller.mjs.map