preferencestore (#15018)
* Starting migration * Migration finished * Fix i18n * Fix some tests * Fix typos * Remove overwite of http status * Add i18n string * Fix i18n * fix breakages * fix tests Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8f42177870
Коммит
83974d8a8d
@@ -1428,8 +1428,14 @@ func (a *App) importDirectChannel(data *DirectChannelImportData, dryRun bool) *m
|
||||
}
|
||||
|
||||
if err := a.Srv().Store.Preference().Save(&preferences); err != nil {
|
||||
err.StatusCode = http.StatusBadRequest
|
||||
return err
|
||||
var appErr *model.AppError
|
||||
switch {
|
||||
case errors.As(err, &appErr):
|
||||
appErr.StatusCode = http.StatusBadRequest
|
||||
return appErr
|
||||
default:
|
||||
return model.NewAppError("importDirectChannel", "app.preference.save.updating.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
}
|
||||
|
||||
if data.Header != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user