[MM-15797] Migrate Session.Remove to Sync by default (#11069)
* [MM-15797] Migrate Session.Remove to Sync by default * Remove unnecessary channel logic and simplify * Refactor code to be more consistent with code base * Rename variable to avoid shadow declaration * Add missing checks in tests * Regenerate the mocks * Run gofmt over code
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
1ca421472f
Коммит
2f36158adb
@@ -102,8 +102,8 @@ func (a *App) RevokeAllSessions(userId string) *model.AppError {
|
||||
if session.IsOAuth {
|
||||
a.RevokeAccessToken(session.Token)
|
||||
} else {
|
||||
if result := <-a.Srv.Store.Session().Remove(session.Id); result.Err != nil {
|
||||
return result.Err
|
||||
if err := a.Srv.Store.Session().Remove(session.Id); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,8 +195,8 @@ func (a *App) RevokeSession(session *model.Session) *model.AppError {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if result := <-a.Srv.Store.Session().Remove(session.Id); result.Err != nil {
|
||||
return result.Err
|
||||
if err := a.Srv.Store.Session().Remove(session.Id); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user