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
1 changed files with 3 additions and 1 deletions

View File

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