Add getscanlang
endpoint
This commit is contained in:
parent
f185c76fa0
commit
04e0638752
1 changed files with 8 additions and 0 deletions
|
@ -1149,6 +1149,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 "/getscanlang" $ do
|
||||||
|
lang <- param "lang"
|
||||||
|
txtPack' <- liftAndCatchIO $ run (findLangComponent lang "scan")
|
||||||
|
case cast' . Doc =<< txtPack' of
|
||||||
|
Nothing -> status noContent204
|
||||||
|
Just textPack -> do
|
||||||
|
status ok200
|
||||||
|
Web.Scotty.json $ toJSON (textPack :: LangComponent)
|
||||||
get "/getloginlang" $ do
|
get "/getloginlang" $ do
|
||||||
lang <- param "lang"
|
lang <- param "lang"
|
||||||
txtPack' <- liftAndCatchIO $ run (findLangComponent lang "login")
|
txtPack' <- liftAndCatchIO $ run (findLangComponent lang "login")
|
||||||
|
|
Loading…
Reference in a new issue