Skip to content

Commit

Permalink
dont inline
Browse files Browse the repository at this point in the history
Signed-off-by: mteodor <mirko.teodorovic@gmail.com>
  • Loading branch information
mteodor committed Feb 5, 2022
1 parent 4abdf3d commit 707bcac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readers/api/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ func authorize(ctx context.Context, req listMessagesReq, tc mainflux.ThingsServi
switch {
case strings.HasPrefix(req.token, userToken):
token := strings.TrimPrefix(req.token, userToken)
var user *mainflux.UserIdentity
if user, err = usersAuth.Identify(ctx, &mainflux.Token{Value: token}); err != nil {
user, err := usersAuth.Identify(ctx, &mainflux.Token{Value: token})
if err != nil {
e, ok := status.FromError(err)
if ok && e.Code() == codes.PermissionDenied {
return errors.Wrap(errCannotAuthorizeUser, err)
Expand Down

0 comments on commit 707bcac

Please sign in to comment.