From f9bf5fb040c01e41771fbfce52a258f906b48ee7 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Fri, 11 Mar 2016 13:43:45 -0600 Subject: [PATCH] Added HTTP 201 to Request and gofmt :) --- restapi.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/restapi.go b/restapi.go index 7534cae..38a765a 100644 --- a/restapi.go +++ b/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 }