users-postgresql-simple 0.5.0.0 → 0.5.0.1
raw patch · 2 files changed
+7/−2 lines, 2 files
Files
src/Web/Users/Postgresql.hs view
@@ -286,7 +286,12 @@ Nothing -> return () Just uuid -> do _ <-- execute conn [sql|UPDATE login_token SET valid_until = valid_until + '? seconds' WHERE token_type = ? AND token = ?;|] (convertTtl timeToLive, tokenType, uuid)+ execute conn [sql|+ UPDATE login_token+ SET valid_until =+ (CASE WHEN NOW() + '? seconds' > valid_until THEN NOW() + '? seconds' ELSE valid_until END)+ WHERE token_type = ?+ AND token = ?;|] (convertTtl timeToLive, convertTtl timeToLive, tokenType, uuid) return () getTokenOwner :: Connection -> String -> T.Text -> IO (Maybe Int64)
users-postgresql-simple.cabal view
@@ -1,5 +1,5 @@ name: users-postgresql-simple-version: 0.5.0.0+version: 0.5.0.1 synopsis: A PostgreSQL backend for the users package description: This library is a backend driver using <http://hackage.haskell.org/package/postgresql-simple postgresql-simple> for <http://hackage.haskell.org/package/users the "users" library>.