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

View file

@ -1433,6 +1433,14 @@ routes pipe config = do
Just textPack -> do Just textPack -> do
status ok200 status ok200
Web.Scotty.json $ toJSON (textPack :: LangComponent) 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 get "/api/getlang" $ do
component <- param "component" component <- param "component"
lang <- param "lang" lang <- param "lang"