Add languange endpoint for pmtservice

This commit is contained in:
Rene Vergara 2023-06-21 15:49:23 -05:00
parent b638b4bbce
commit 547d5511fa
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
1 changed files with 8 additions and 0 deletions

View File

@ -1433,6 +1433,14 @@ routes pipe config = do
Just textPack -> do
status ok200
Web.Scotty.json $ toJSON (textPack :: LangComponent)
get "/getpmtservicelang" $ do
lang <- param "lang"
txtPack' <- liftAndCatchIO $ run (findLangComponent lang "pmtservice")
case cast' . Doc =<< txtPack' of
Nothing -> status noContent204
Just textPack -> do
status ok200
Web.Scotty.json $ toJSON (textPack :: LangComponent)
get "/api/getlang" $ do
component <- param "component"
lang <- param "lang"