From 55d30b8b0f5f149310c8e6858dc8561956617de2 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Wed, 10 May 2023 10:42:40 -0500 Subject: [PATCH] Correct `OwnerData` --- src/Owner.hs | 4 +++- src/ZGoBackend.hs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Owner.hs b/src/Owner.hs index a7ebe1d..9df5128 100644 --- a/src/Owner.hs +++ b/src/Owner.hs @@ -289,6 +289,7 @@ data OwnerData = , od_email :: T.Text , od_website :: T.Text , od_phone :: T.Text + , od_payconf :: Bool } deriving (Eq, Show) @@ -306,7 +307,8 @@ instance FromJSON OwnerData where e <- obj .: "email" w <- obj .: "website" ph <- obj .: "phone" - pure $ OwnerData f l n s c st p co e w ph + pc <- obj .: "payconf" + pure $ OwnerData f l n s c st p co e w ph pc -- Database actions -- | Function to upsert an Owner diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index f74084e..5641d45 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -932,6 +932,7 @@ routes pipe config = do , "zats" .= ozats q , "invoices" .= oinvoices q , "expiration" .= oexpiration q + , "payconf" .= opayconf q , "crmToken" .= ocrmToken q ] ]) @@ -963,6 +964,7 @@ routes pipe config = do , "zats" .= ozats q , "invoices" .= oinvoices q , "expiration" .= oexpiration q + , "payconf" .= opayconf q , "crmToken" .= ocrmToken q ] ])