Skip to content

Commit

Permalink
fix db transaction commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HermanPlay committed Dec 26, 2024
1 parent 068d3b5 commit e3de59d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions package/service/session_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ func (s *SessionServiceImpl) ValidateSession(tx *gorm.DB, sessionId string) (sch
return schemas.ValidateSessionResponse{Valid: false, UserId: -1}, ErrSessionExpired
}

if err := tx.Commit().Error; err != nil {
logger.Log(s.session_logger, "Error committing transaction:", err.Error(), logger.Error)
return schemas.ValidateSessionResponse{Valid: false, UserId: -1}, err
}
return schemas.ValidateSessionResponse{Valid: true, UserId: session.UserId}, nil
}

Expand Down

0 comments on commit e3de59d

Please sign in to comment.