Skip to content

Commit

Permalink
Fixes list authorizations error (Issue #86)
Browse files Browse the repository at this point in the history
Signed-off-by: [email protected]
  • Loading branch information
selvik committed Dec 14, 2016
1 parent 70790eb commit 3710728
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion proxy/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func listTenantAuthorizations(token *auth.Token, w http.ResponseWriter, req *htt
httpStatus = http.StatusOK

// convert authorizations to authorization reply msgs
var authzReplyList []GetAuthorizationReply
authzReplyList := []GetAuthorizationReply{}
for _, authz := range authzList {
authzReply := convertAuthz(authz)
authzReplyList = append(authzReplyList, authzReply)
Expand Down
8 changes: 4 additions & 4 deletions state/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func ListAuthorizations() (
return nil, ccnerrors.ErrReadingFromStore
}

var list []types.Authorization
list := []types.Authorization{}
for _, auth := range allAuthZList {
tmp, ok := auth.(*types.Authorization)
if ok {
Expand Down Expand Up @@ -124,7 +124,7 @@ func ListAuthorizationsByPrincipal(ID string) (
return nil, ccnerrors.ErrReadingFromStore
}

var match []types.Authorization
match := []types.Authorization{}
for _, auth := range allAuthZList {
tmp, ok := auth.(*types.Authorization)
if ok {
Expand Down Expand Up @@ -215,7 +215,7 @@ func ListAuthorizationsByClaim(claim string) (
return nil, ccnerrors.ErrReadingFromStore
}

var match []types.Authorization
match := []types.Authorization{}
for _, auth := range allAuthZList {
tmp, ok := auth.(*types.Authorization)
if ok {
Expand Down Expand Up @@ -304,7 +304,7 @@ func ListAuthorizationsByClaimAndPrincipal(claim string, ID string) (
return nil, ccnerrors.ErrReadingFromStore
}

var match []types.Authorization
match := []types.Authorization{}
for _, auth := range allAuthZList {
tmp, ok := auth.(*types.Authorization)
if ok {
Expand Down

0 comments on commit 3710728

Please sign in to comment.