MM-21976: Include cache layer to be tested (#13749)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c9a0418a32
Коммит
b162cf92cd
@@ -1279,6 +1279,8 @@ func (a *App) UpdatePassword(user *model.User, newPassword string) *model.AppErr
|
||||
return model.NewAppError("UpdatePassword", "api.user.update_password.failed.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
a.InvalidateCacheForUser(user.Id)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1681,11 +1683,12 @@ func (a *App) GetTotalUsersStats(viewRestrictions *model.ViewUsersRestrictions)
|
||||
}
|
||||
|
||||
func (a *App) VerifyUserEmail(userId, email string) *model.AppError {
|
||||
_, err := a.Srv().Store.User().VerifyEmail(userId, email)
|
||||
if err != nil {
|
||||
if _, err := a.Srv().Store.User().VerifyEmail(userId, email); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.InvalidateCacheForUser(userId)
|
||||
|
||||
user, err := a.GetUser(userId)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user