diff options
author | William Carroll <wpcarro@gmail.com> | 2020-07-29T19·21+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-07-29T19·21+0100 |
commit | 16f50e33bc20cfd1010d22c8533c0e6666a41f4c (patch) | |
tree | 98893255908be320a16f815e50ed9524620bfd42 | |
parent | c4a090e55803864c21e8c40432ca17772247ca8e (diff) |
Prefer deleting sessions by their UUID
Instead of deleting them by usernames.
-rw-r--r-- | src/Sessions.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Sessions.hs b/src/Sessions.hs index 1d3f0d6e88fa..12b641b92ff6 100644 --- a/src/Sessions.hs +++ b/src/Sessions.hs @@ -43,9 +43,9 @@ refresh dbFile uuid = withConnection dbFile $ \conn -> do pure () -- | Delete the session under `username` from `dbFile`. -delete :: FilePath -> T.Username -> IO () -delete dbFile username = withConnection dbFile $ \conn -> - execute conn "DELETE FROM Sessions WHERE username = ?" (Only username) +delete :: FilePath -> T.SessionUUID -> IO () +delete dbFile uuid = withConnection dbFile $ \conn -> + execute conn "DELETE FROM Sessions WHERE uuid = ?" (Only uuid) -- | Find or create a session in the Sessions table. If a session exists, -- refresh the token's validity. |