* Migrate to Sync by default #11096 * Update with gofmt
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
b0ad3c10e9
Коммит
9445cb29f5
@@ -254,15 +254,12 @@ func (s SqlTeamStore) Update(team *model.Team) (*model.Team, *model.AppError) {
|
||||
return team, nil
|
||||
}
|
||||
|
||||
func (s SqlTeamStore) UpdateDisplayName(name string, teamId string) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
if _, err := s.GetMaster().Exec("UPDATE Teams SET DisplayName = :Name WHERE Id = :Id", map[string]interface{}{"Name": name, "Id": teamId}); err != nil {
|
||||
result.Err = model.NewAppError("SqlTeamStore.UpdateName", "store.sql_team.update_display_name.app_error", nil, "team_id="+teamId, http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
func (s SqlTeamStore) UpdateDisplayName(name string, teamId string) *model.AppError {
|
||||
if _, err := s.GetMaster().Exec("UPDATE Teams SET DisplayName = :Name WHERE Id = :Id", map[string]interface{}{"Name": name, "Id": teamId}); err != nil {
|
||||
return model.NewAppError("SqlTeamStore.UpdateName", "store.sql_team.update_display_name.app_error", nil, "team_id="+teamId, http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
result.Data = teamId
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s SqlTeamStore) Get(id string) (*model.Team, *model.AppError) {
|
||||
|
||||
Ссылка в новой задаче
Block a user