Next auth fixes (#658)

This commit is contained in:
Geometrically
2023-07-14 22:55:00 -07:00
committed by GitHub
parent a89418e33b
commit ec80c2b9db
6 changed files with 19 additions and 18 deletions

View File

@@ -167,7 +167,7 @@ pub async fn delete(
let session = DBSession::get(info.into_inner().0, &**pool, &redis).await?;
if let Some(session) = session {
if session.user_id != current_user.id.into() {
if session.user_id == current_user.id.into() {
let mut transaction = pool.begin().await?;
DBSession::remove(session.id, &mut transaction).await?;
DBSession::clear_cache(