Skip to content

Commit

Permalink
Merge pull request #45 from Microkubes/customer-id-to-float
Browse files Browse the repository at this point in the history
Changes customerID type: string->float64
  • Loading branch information
blazhovsky authored Feb 10, 2021
2 parents f8ac680 + 40551e7 commit 435e9d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Auth struct {
UserID string `json:"userId,omitempty"`

// CustomerID is the ID of the customer to which the authenticated user belongs.
CustomerID string `json:"customerID,omitempty"`
CustomerID float64 `json:"customerID,omitempty"`

// Username is the username of the authenticated user.
Username string `json:"username,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewJWTSecurityMiddleware(resolver goajwt.KeyResolver, scheme *goa.JWTSecuri
}

if _, ok := claims["customerID"]; ok {
authObj.CustomerID = claims["customerID"].(string)
authObj.CustomerID = claims["customerID"].(float64)
}

if _, ok := claims["username"]; ok {
Expand Down

0 comments on commit 435e9d9

Please sign in to comment.