mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-01 05:22:50 +09:00
Refactor session close as xorm already does everything needed internally (#2020)
This commit is contained in:
@ -24,7 +24,7 @@ func FollowUser(userID, followID int64) (err error) {
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
defer sess.Close()
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -50,7 +50,7 @@ func UnfollowUser(userID, followID int64) (err error) {
|
||||
}
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sessionRelease(sess)
|
||||
defer sess.Close()
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user