From 017da3d0df974cc98c78f2962e2b99c09cab1c37 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Date: Thu, 24 Oct 2019 12:18:01 +0530
Subject: [PATCH] dbConnection: rename the `name' parameter to `path'

---
 src/PaymentServer/Persistence.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PaymentServer/Persistence.hs b/src/PaymentServer/Persistence.hs
index d4451dc..1317d90 100644
--- a/src/PaymentServer/Persistence.hs
+++ b/src/PaymentServer/Persistence.hs
@@ -151,8 +151,8 @@ insertVoucherAndFingerprint dbConn voucher fingerprint =
 -- | create and open a database with a given `name` and create the `voucher` table
 -- and `redeemed` table with the provided schema
 getDBConnection :: Text -> IO VoucherDatabaseState
-getDBConnection name = do
-  dbConn <- Sqlite.open (unpack name)
+getDBConnection path = do
+  dbConn <- Sqlite.open (unpack path)
   Sqlite.execute_ dbConn "PRAGMA foreign_keys = ON"
   Sqlite.execute_ dbConn "CREATE TABLE IF NOT EXISTS vouchers (id INTEGER PRIMARY KEY, name TEXT UNIQUE)"
   Sqlite.execute_ dbConn "CREATE TABLE IF NOT EXISTS redeemed (id INTEGER PRIMARY KEY, voucher_id INTEGER, fingerprint TEXT, FOREIGN KEY (voucher_id) REFERENCES vouchers(id))"
-- 
GitLab