[MM-16652] Migrate "User.ResetLastPictureUpdate" to Sync by default (#11474)
* [MM-16652] Migrate "User.ResetLastPictureUpdate" to Sync by default * [Suggested Changes] Added mlog for error and removed return of userid
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
cff942f5bf
Коммит
0d5020e566
@@ -224,14 +224,12 @@ func (us SqlUserStore) UpdateLastPictureUpdate(userId string) store.StoreChannel
|
||||
})
|
||||
}
|
||||
|
||||
func (us SqlUserStore) ResetLastPictureUpdate(userId string) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
if _, err := us.GetMaster().Exec("UPDATE Users SET LastPictureUpdate = :Time, UpdateAt = :Time WHERE Id = :UserId", map[string]interface{}{"Time": 0, "UserId": userId}); err != nil {
|
||||
result.Err = model.NewAppError("SqlUserStore.ResetLastPictureUpdate", "store.sql_user.update_last_picture_update.app_error", nil, "user_id="+userId, http.StatusInternalServerError)
|
||||
} else {
|
||||
result.Data = userId
|
||||
}
|
||||
})
|
||||
func (us SqlUserStore) ResetLastPictureUpdate(userId string) *model.AppError {
|
||||
if _, err := us.GetMaster().Exec("UPDATE Users SET LastPictureUpdate = :Time, UpdateAt = :Time WHERE Id = :UserId", map[string]interface{}{"Time": 0, "UserId": userId}); err != nil {
|
||||
return model.NewAppError("SqlUserStore.ResetLastPictureUpdate", "store.sql_user.update_last_picture_update.app_error", nil, "user_id="+userId, http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (us SqlUserStore) UpdateUpdateAt(userId string) store.StoreChannel {
|
||||
|
||||
Ссылка в новой задаче
Block a user