UNPKG

intlayer-editor

Version:

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

33 lines 907 B
import { getConfiguration as getApplicationConfiguration } from "@intlayer/config"; import { formatResponse } from "./../utils/responseData.mjs"; const getConfiguration = async (_req, res, _next) => { try { const config = getApplicationConfiguration(); const formattedResponse = formatResponse({ data: config }); 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; } }; export { getConfiguration }; //# sourceMappingURL=configuration.controller.mjs.map