Add URI to user resource

This commit is contained in:
Eli Ribble 2026-03-28 15:13:11 -07:00
parent e59794f5e0
commit 4bfaaa72ce
No known key found for this signature in database

View file

@ -32,6 +32,7 @@ type User struct {
PasswordHash string `json:"-"`
PasswordHashType string `json:"-"`
Role string `json:"role"`
URI string `json:"uri"`
Username string `json:"username"`
model *models.User
@ -58,6 +59,7 @@ func newUser(ctx context.Context, org Organization, user *models.User) User {
PasswordHash: user.PasswordHash,
PasswordHashType: string(user.PasswordHashType),
Role: user.Role.String(),
URI: fmt.Sprintf("/user/%d", user.ID),
Username: user.Username,
model: user,