Chore: Delete password and search from models package (#62482)

* Chore: Delete password and search from models package

* Rename model to AdminCreateUserResponse
This commit is contained in:
idafurjes
2023-01-31 11:04:55 +01:00
committed by GitHub
parent 60575041a5
commit cbc10f9c5d
9 changed files with 29 additions and 110 deletions

View File

@@ -152,7 +152,7 @@ type UserProfileDTO struct {
AuthLabels []string `json:"authLabels"`
UpdatedAt time.Time `json:"updatedAt"`
CreatedAt time.Time `json:"createdAt"`
AvatarUrl string `json:"avatarUrl"`
AvatarURL string `json:"avatarUrl"`
AccessControl map[string]bool `json:"accessControl,omitempty"`
}
@@ -241,7 +241,7 @@ type UserDisplayDTO struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Login string `json:"login,omitempty"`
AvatarUrl string `json:"avatarUrl"`
AvatarURL string `json:"avatarUrl"`
}
// ------------------------
@@ -362,3 +362,14 @@ const (
QuotaTargetSrv string = "user"
QuotaTarget string = "user"
)
type AdminCreateUserResponse struct {
ID int64 `json:"id"`
Message string `json:"message"`
}
type Password string
func (p Password) IsWeak() bool {
return len(p) <= 4
}