Migrate to idiomatic error handling app/a*.go and app/b*.go (#9455)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
3785ad48c1
Коммит
7636650a25
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user