Skip to content

Commit

Permalink
copy-paste fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek committed Sep 20, 2024
1 parent c51c839 commit c47412b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/kubeclient/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,19 @@ func (c *userSignupClient) Get(name string) (*crtapi.UserSignup, error) {
// Create creates a new UserSignup resource in the cluster, and returns the resulting UserSignup that was created, or
// an error if something went wrong
func (c *userSignupClient) Create(obj *crtapi.UserSignup) (*crtapi.UserSignup, error) {
result := &crtapi.UserSignup{}
if err := c.client.Create(context.TODO(), obj); err != nil {

Check warning on line 44 in pkg/kubeclient/signup.go

View check run for this annotation

Codecov / codecov/patch

pkg/kubeclient/signup.go#L44

Added line #L44 was not covered by tests
return nil, err
}
return result, nil
return obj, nil

Check warning on line 47 in pkg/kubeclient/signup.go

View check run for this annotation

Codecov / codecov/patch

pkg/kubeclient/signup.go#L47

Added line #L47 was not covered by tests
}

// Update will update an existing UserSignup resource in the cluster, returning an error if something went wrong
func (c *userSignupClient) Update(obj *crtapi.UserSignup) (*crtapi.UserSignup, error) {
result := &crtapi.UserSignup{}
err := c.client.Update(context.TODO(), obj)

Check warning on line 52 in pkg/kubeclient/signup.go

View check run for this annotation

Codecov / codecov/patch

pkg/kubeclient/signup.go#L52

Added line #L52 was not covered by tests
if err != nil {
return nil, err
}
return result, nil
return obj, nil

Check warning on line 56 in pkg/kubeclient/signup.go

View check run for this annotation

Codecov / codecov/patch

pkg/kubeclient/signup.go#L56

Added line #L56 was not covered by tests
}

// ListActiveSignupsByPhoneNumberOrHash will return a list of non-deactivated UserSignups that have a phone number hash
Expand Down

0 comments on commit c47412b

Please sign in to comment.