UNPKG

intlayer-editor

Version:

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

55 lines 2.01 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var configuration_controller_exports = {}; __export(configuration_controller_exports, { getConfiguration: () => getConfiguration }); module.exports = __toCommonJS(configuration_controller_exports); var import_config = require("@intlayer/config"); var import_responseData = require('./../utils/responseData.cjs'); const getConfiguration = async (_req, res, _next) => { try { const config = (0, import_config.getConfiguration)(); const formattedResponse = (0, import_responseData.formatResponse)({ data: config }); res.json(formattedResponse); return; } catch (err) { const errorMessage = err ?? { message: "Internal Server Error", status: 500 }; const formattedErrorResponse = (0, import_responseData.formatResponse)({ error: { message: errorMessage.message ?? "Internal Server Error", code: "INTERNAL_SERVER_ERROR", title: "Internal Server Error" }, status: errorMessage.status ?? 500 }); res.json(formattedErrorResponse); return; } }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { getConfiguration }); //# sourceMappingURL=configuration.controller.cjs.map