Skip to content

Commit

Permalink
Remove useless marshal/unmarshal
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Jul 4, 2024
1 parent 7b1cbc9 commit 039088b
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions api/user_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,6 @@ func getSessionResponse(ctx context.Context, session *models.Principal) (*models
resourcePermissions[key] = resourceActions

}
serializedPolicy, err := json.Marshal(policy)
if err != nil {
return nil, ErrorWithContext(ctx, err, ErrInvalidSession)
}
var sessionPolicy *models.IamPolicy
err = json.Unmarshal(serializedPolicy, &sessionPolicy)
if err != nil {
return nil, ErrorWithContext(ctx, err)
}

// environment constants
var envConstants models.EnvironmentConstants
Expand Down

0 comments on commit 039088b

Please sign in to comment.