Added HTTP 201 to Request and gofmt :)

This commit is contained in:
Bruce Marriner 2016-03-11 13:43:45 -06:00
parent 798640ecf7
commit f9bf5fb040

View file

@ -107,6 +107,7 @@ func (s *Session) request(method, urlStr, contentType string, b []byte) (respons
switch resp.StatusCode {
case http.StatusOK:
case http.StatusCreated:
case http.StatusNoContent:
// TODO check for 401 response, invalidate token if we get one.
@ -361,7 +362,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions
}
}
if apermissions & PermissionManageRoles > 0 {
if apermissions&PermissionManageRoles > 0 {
apermissions |= PermissionAll
}
@ -384,7 +385,7 @@ func (s *Session) UserChannelPermissions(userID, channelID string) (apermissions
}
}
if apermissions & PermissionManageRoles > 0 {
if apermissions&PermissionManageRoles > 0 {
apermissions |= PermissionAllChannel
}