* 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>
Этот коммит содержится в:
Agniva De Sarker
2020-07-28 10:27:24 +05:30
коммит произвёл GitHub
родитель 8f42177870
Коммит 83974d8a8d
19 изменённых файлов: 241 добавлений и 261 удалений

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

@@ -215,8 +215,8 @@ func (a *App) AllowOAuthAppAccessToUser(userId string, authRequest *model.Author
Value: authRequest.Scope,
}
if err = a.Srv().Store.Preference().Save(&model.Preferences{authorizedApp}); err != nil {
mlog.Error("error saving store prefrence", mlog.Err(err))
if nErr := a.Srv().Store.Preference().Save(&model.Preferences{authorizedApp}); nErr != nil {
mlog.Error("error saving store preference", mlog.Err(nErr))
return authRequest.RedirectUri + "?error=server_error&state=" + authRequest.State, nil
}
@@ -487,7 +487,7 @@ func (a *App) DeauthorizeOAuthAppForUser(userId, appId string) *model.AppError {
// Deauthorize the app
if err := a.Srv().Store.Preference().Delete(userId, model.PREFERENCE_CATEGORY_AUTHORIZED_OAUTH_APP, appId); err != nil {
return err
return model.NewAppError("DeauthorizeOAuthAppForUser", "app.preference.delete.app_error", nil, err.Error(), http.StatusInternalServerError)
}
return nil