{"version":3,"sources":["../../src/routes/dictionary.routes.ts"],"sourcesContent":["import type { Routes } from '@/types/Routes';\nimport {\n  getDictionaries,\n  writeContentDeclaration,\n} from '@controllers/dictionary.controller';\nimport { getConfiguration } from '@intlayer/config';\nimport { Router } from 'express';\n\nexport const dictionaryRouter: Router = Router();\n\nconst { editor } = getConfiguration();\n\nconst getBaseURL = () => `${editor.editorURL}/api/dictionary`;\n\nexport const getDictionaryRoutes = () =>\n  ({\n    getDictionaries: {\n      urlModel: '/',\n      url: getBaseURL(),\n      method: 'GET',\n    },\n    writeContentDeclaration: {\n      urlModel: '/',\n      url: getBaseURL(),\n      method: 'POST',\n    },\n  }) satisfies Routes;\n\ndictionaryRouter.get(\n  getDictionaryRoutes().getDictionaries.urlModel,\n  getDictionaries\n);\ndictionaryRouter.post(\n  getDictionaryRoutes().writeContentDeclaration.urlModel,\n  writeContentDeclaration\n);\n"],"mappings":"AACA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,cAAc;AAEhB,MAAM,mBAA2B,OAAO;AAE/C,MAAM,EAAE,OAAO,IAAI,iBAAiB;AAEpC,MAAM,aAAa,MAAM,GAAG,OAAO,SAAS;AAErC,MAAM,sBAAsB,OAChC;AAAA,EACC,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,KAAK,WAAW;AAAA,IAChB,QAAQ;AAAA,EACV;AAAA,EACA,yBAAyB;AAAA,IACvB,UAAU;AAAA,IACV,KAAK,WAAW;AAAA,IAChB,QAAQ;AAAA,EACV;AACF;AAEF,iBAAiB;AAAA,EACf,oBAAoB,EAAE,gBAAgB;AAAA,EACtC;AACF;AACA,iBAAiB;AAAA,EACf,oBAAoB,EAAE,wBAAwB;AAAA,EAC9C;AACF;","names":[]}