forked from mirrors/homebox
fix: ui/ux issues (#34)
* fix select first bug for creation * add link to header * fix date and display errors * drop group name requirement
This commit is contained in:
parent
79f7ad40cb
commit
a6e3989aee
13 changed files with 33 additions and 46 deletions
|
@ -28,7 +28,6 @@ type (
|
|||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
GroupName string `json:"groupName"`
|
||||
}
|
||||
UserAuthTokenDetail struct {
|
||||
Raw string `json:"raw"`
|
||||
|
@ -46,7 +45,6 @@ func (svc *UserService) RegisterUser(ctx context.Context, data UserRegistration)
|
|||
log.Debug().
|
||||
Str("name", data.Name).
|
||||
Str("email", data.Email).
|
||||
Str("groupName", data.GroupName).
|
||||
Str("groupToken", data.GroupToken).
|
||||
Msg("Registering new user")
|
||||
|
||||
|
@ -57,7 +55,7 @@ func (svc *UserService) RegisterUser(ctx context.Context, data UserRegistration)
|
|||
)
|
||||
|
||||
if data.GroupToken == "" {
|
||||
group, err = svc.repos.Groups.GroupCreate(ctx, data.GroupName)
|
||||
group, err = svc.repos.Groups.GroupCreate(ctx, "Home")
|
||||
if err != nil {
|
||||
log.Err(err).Msg("Failed to create group")
|
||||
return repo.UserOut{}, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue