Skip to content
Snippets Groups Projects
Commit 681e7aac authored by Ramakrishnan Muthukrishnan's avatar Ramakrishnan Muthukrishnan
Browse files

isVoucherUnpaid: We get an integer, not a Voucher from the query

parent 9ebfd210
No related branches found
No related tags found
1 merge request!26Initial implementation of Persistence using sqlite
......@@ -134,7 +134,7 @@ instance FromRow Fingerprint where
-- | Checks if the given `voucher` is unpaid.
isVoucherUnpaid :: Sqlite.Connection -> Voucher -> IO Bool
isVoucherUnpaid dbConn voucher =
null <$> (Sqlite.query dbConn "SELECT 1 FROM vouchers WHERE vouchers.name = ? LIMIT 1" (Sqlite.Only voucher) :: IO [Voucher])
null <$> (Sqlite.query dbConn "SELECT 1 FROM vouchers WHERE vouchers.name = ? LIMIT 1" (Sqlite.Only voucher) :: IO [Sqlite.Only Int])
getVoucherFingerprint :: Sqlite.Connection -> Voucher -> IO [Fingerprint]
getVoucherFingerprint dbConn voucher =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment