Migrate to idiomatic error handling app/a*.go and app/b*.go (#9455)

Этот коммит содержится в:
Jesús Espino
2018-09-25 14:42:06 +02:00
коммит произвёл Joram Wilander
родитель 3785ad48c1
Коммит 7636650a25
5 изменённых файлов: 93 добавлений и 86 удалений

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

@@ -53,7 +53,9 @@ func (a *App) SessionHasPermissionToChannel(session model.Session, channelId str
channel, err := a.GetChannel(channelId)
if err == nil && channel.TeamId != "" {
return a.SessionHasPermissionToTeam(session, channel.TeamId, permission)
} else if err != nil && err.StatusCode == http.StatusNotFound {
}
if err != nil && err.StatusCode == http.StatusNotFound {
return false
}