diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 3e13d45..56bbff3 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -1149,6 +1149,14 @@ routes pipe config = do Just textPack -> do status ok200 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 lang <- param "lang" txtPack' <- liftAndCatchIO $ run (findLangComponent lang "login")