UNPKG

intlayer-editor

Version:

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

34 lines 855 B
import { getDictionaries, writeContentDeclaration } from "./../controllers/dictionary.controller.mjs"; import { getConfiguration } from "@intlayer/config"; import { Router } from "express"; const dictionaryRouter = Router(); const { editor } = getConfiguration(); const getBaseURL = () => `${editor.editorURL}/api/dictionary`; const getDictionaryRoutes = () => ({ getDictionaries: { urlModel: "/", url: getBaseURL(), method: "GET" }, writeContentDeclaration: { urlModel: "/", url: getBaseURL(), method: "POST" } }); dictionaryRouter.get( getDictionaryRoutes().getDictionaries.urlModel, getDictionaries ); dictionaryRouter.post( getDictionaryRoutes().writeContentDeclaration.urlModel, writeContentDeclaration ); export { dictionaryRouter, getDictionaryRoutes }; //# sourceMappingURL=dictionary.routes.mjs.map