about summary refs log tree commit diff
path: root/src/Auth.hs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-04T08·19+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-04T08·19+0100
commitee8e75231cd9d3d4aa3ffbbfa0e3b8511712e1ee (patch)
tree6264013fea0cfc8489f3d9f24cdc7ae1d63a9f50 /src/Auth.hs
parent9a19942c037ec62700c41c235154ff38816c0a3a (diff)
Set -Wall and fix warnings
I think setting -Wall is a sensible default and @dmjio confirmed this. After
putting this in my project's .ghci file, a few dozen warnings emerged. This
commit changes the code that causes the warnings.
Diffstat (limited to 'src/Auth.hs')
-rw-r--r--src/Auth.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Auth.hs b/src/Auth.hs
index 4962ce50abef..f1bff23257e0 100644
--- a/src/Auth.hs
+++ b/src/Auth.hs
@@ -4,19 +4,13 @@
 module Auth where
 --------------------------------------------------------------------------------
 import Control.Monad.IO.Class (liftIO)
-import Data.String.Conversions (cs)
-import Database.SQLite.Simple
-import Utils
 import Web.Cookie
 import Servant
-import Servant.Server.Internal.ServerError
 
 import qualified Data.UUID as UUID
-import qualified Web.Cookie as WC
 import qualified Sessions as Sessions
 import qualified Accounts as Accounts
 import qualified Types as T
-import qualified Data.ByteString.Lazy as LBS
 --------------------------------------------------------------------------------
 
 -- | Return the UUID from a Session cookie.
@@ -28,7 +22,7 @@ uuidFromCookie (T.SessionCookie cookies) = do
 
 -- | Attempt to return the account associated with `cookie`.
 accountFromCookie :: FilePath -> T.SessionCookie -> IO (Maybe T.Account)
-accountFromCookie dbFile cookie = withConnection dbFile $ \conn -> do
+accountFromCookie dbFile cookie =
   case uuidFromCookie cookie of
     Nothing -> pure Nothing
     Just uuid -> do