Browse Source

Added HTTP 201 to Request and gofmt :)

Bruce Marriner 8 years ago
parent
commit
f9bf5fb040
1 changed files with 3 additions and 2 deletions
  1. 3 2
      restapi.go

+ 3 - 2
restapi.go

@@ -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
 	}