Skip to content

Commit

Permalink
Added role to AuthdUser in stupid.Request
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebQ42 committed Jan 5, 2024
1 parent 5a616ea commit 2f72b1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (s *Stupid) decodeJWT(token string) (*AuthdUser, error) {
ID: usr.ID,
Username: usr.Username,
Email: usr.Email,
Role: usr.Role,
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type AuthdUser struct {
ID string `json:"id" bson:"_id"`
Username string `json:"username" bson:"username"`
Email string `json:"email" bson:"email"`
Role string `json:"role" bson:"role"`
}

type user struct {
Expand Down

0 comments on commit 2f72b1e

Please sign in to comment.