From 547d5511fa88b893f9fab662639313ce89a70fa4 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Wed, 21 Jun 2023 15:49:23 -0500 Subject: [PATCH] Add languange endpoint for pmtservice --- src/ZGoBackend.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 7468370..72968f8 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -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"