Add batch load of translation

This commit is contained in:
Rene Vergara 2023-02-16 07:49:05 -06:00
parent de3293f6ec
commit 6a766ee0d8
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -1039,7 +1039,9 @@ routes pipe config = do
Web.Scotty.json $ toJSON (tP :: LangComponent) Web.Scotty.json $ toJSON (tP :: LangComponent)
post "/api/setlang" $ do post "/api/setlang" $ do
langComp <- jsonData langComp <- jsonData
_ <- liftAndCatchIO $ run (loadLangComponent langComp) _ <-
liftAndCatchIO $
mapM (run . loadLangComponent) (langComp :: [LangComponent])
status created201 status created201
-- | Make a Zcash RPC call -- | Make a Zcash RPC call