Correct `OwnerData`

This commit is contained in:
Rene Vergara 2023-05-10 10:42:40 -05:00
parent d67d1937f5
commit 55d30b8b0f
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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
]
])