Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

MustChangePassword must be nillable #150

Merged
merged 1 commit into from
Feb 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gitea/admin_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type CreateUserOption struct {
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
// required: true
Password string `json:"password" binding:"Required;MaxSize(255)"`
MustChangePassword bool `json:"must_change_password"`
MustChangePassword *bool `json:"must_change_password"`
SendNotify bool `json:"send_notify"`
}

Expand All @@ -46,7 +46,7 @@ type EditUserOption struct {
// swagger:strfmt email
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
Password string `json:"password" binding:"MaxSize(255)"`
MustChangePassword bool `json:"must_change_password"`
MustChangePassword *bool `json:"must_change_password"`
Website string `json:"website" binding:"MaxSize(50)"`
Location string `json:"location" binding:"MaxSize(50)"`
Active *bool `json:"active"`
Expand Down