Add languange endpoint for pmtservice
This commit is contained in:
parent
b638b4bbce
commit
547d5511fa
1 changed files with 8 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue