Migrate "Team.UpdateLastTeamIconUpdate" to Sync by default (#11561)

Этот коммит содержится в:
Alejandro Sánchez Medina
2019-07-07 21:55:17 +02:00
коммит произвёл jfrerich
родитель 4380c0b7a8
Коммит 7663c5b00e
5 изменённых файлов: 15 добавлений и 18 удалений

Просмотреть файл

@@ -794,14 +794,11 @@ func (s SqlTeamStore) RemoveAllMembersByUser(userId string) store.StoreChannel {
})
}
func (us SqlTeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
if _, err := us.GetMaster().Exec("UPDATE Teams SET LastTeamIconUpdate = :Time, UpdateAt = :Time WHERE Id = :teamId", map[string]interface{}{"Time": curTime, "teamId": teamId}); err != nil {
result.Err = model.NewAppError("SqlTeamStore.UpdateLastTeamIconUpdate", "store.sql_team.update_last_team_icon_update.app_error", nil, "team_id="+teamId, http.StatusInternalServerError)
return
}
result.Data = teamId
})
func (us SqlTeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) *model.AppError {
if _, err := us.GetMaster().Exec("UPDATE Teams SET LastTeamIconUpdate = :Time, UpdateAt = :Time WHERE Id = :teamId", map[string]interface{}{"Time": curTime, "teamId": teamId}); err != nil {
return model.NewAppError("SqlTeamStore.UpdateLastTeamIconUpdate", "store.sql_team.update_last_team_icon_update.app_error", nil, "team_id="+teamId, http.StatusInternalServerError)
}
return nil
}
func (s SqlTeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) store.StoreChannel {