forked from mirrors/homebox
cleanup user token access
This commit is contained in:
parent
1107904f47
commit
682774c9ce
5 changed files with 13 additions and 16 deletions
|
@ -23,7 +23,7 @@ type UserService struct {
|
|||
repos *repo.AllRepos
|
||||
}
|
||||
|
||||
func (UserService) toOutUser(user *ent.User, err error) (*types.UserOut, error) {
|
||||
func ToOutUser(user *ent.User, err error) (*types.UserOut, error) {
|
||||
if err != nil {
|
||||
return &types.UserOut{}, err
|
||||
}
|
||||
|
@ -37,6 +37,10 @@ func (UserService) toOutUser(user *ent.User, err error) (*types.UserOut, error)
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (UserService) toOutUser(user *ent.User, err error) (*types.UserOut, error) {
|
||||
return ToOutUser(user, err)
|
||||
}
|
||||
|
||||
func (svc *UserService) RegisterUser(ctx context.Context, data types.UserRegistration) (*types.UserOut, error) {
|
||||
group, err := svc.repos.Groups.Create(ctx, data.GroupName)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue