Mercurial > gemma
diff pkg/models/user.go @ 5345:95dafb72a288 extented-report
Added a PATCH endpoint for /api/users/{user}
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 20 Jun 2021 04:17:53 +0200 |
parents | b1b9b384540d |
children | 45b03e8ca47e |
line wrap: on
line diff
--- a/pkg/models/user.go Fri Jun 18 21:27:41 2021 +0200 +++ b/pkg/models/user.go Sun Jun 20 04:17:53 2021 +0200 @@ -50,6 +50,17 @@ Extent *BoundingBox `json:"extent"` } + // UserPatch is used to send only partial updates. + UserPatch struct { + User *UserName `json:"user,omitempty"` + Role *Role `json:"role,omitempty"` + Password *string `json:"password,omitempty"` + Email *Email `json:"email,omitempty"` + Country *Country `json:"country,omitempty"` + Reports *bool `json:"reports,omitempty"` + Extent *BoundingBox `json:"extent,omitempty"` + } + // PWResetUser is send to request a password reset for a user. PWResetUser struct { User string `json:"user"`