[PLT-6936] Translate AppError.Message automatically by default (#8063)

Этот коммит содержится в:
Jesús Espino
2018-01-08 19:13:24 +01:00
коммит произвёл Joram Wilander
родитель 591ef9f352
Коммит dd9ad10d70
15 изменённых файлов: 28 добавлений и 20 удалений

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

@@ -13,7 +13,6 @@ import (
"github.com/mattermost/mattermost-server/app/plugin"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
type Plugin struct {
@@ -65,7 +64,6 @@ func (p *Plugin) handleGetAttributes(w http.ResponseWriter, r *http.Request) {
attributes, err := p.api.GetLdapUserAttributes(id, config.Attributes)
if err != nil {
err.Translate(utils.T)
http.Error(w, fmt.Sprintf("Errored getting attributes: %v", err.Error()), http.StatusInternalServerError)
}