Skip to content

Commit

Permalink
Fix return error by function
Browse files Browse the repository at this point in the history
Signed-off-by: karamaru-alpha <[email protected]>
  • Loading branch information
karamaru-alpha committed Oct 19, 2023
1 parent a576384 commit d3086a0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/model/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,15 @@ func (p *ProjectSSOConfig) Encrypt(encrypter encrypter) error {
if p.Github == nil {
return nil

Check warning on line 234 in pkg/model/project.go

View check run for this annotation

Codecov / codecov/patch

pkg/model/project.go#L234

Added line #L234 was not covered by tests
}
if err := p.Github.Encrypt(encrypter); err != nil {
return err
}
return nil
return p.Github.Encrypt(encrypter)
}

// Decrypt decrypts encrypted data in ProjectSSOConfig.
func (p *ProjectSSOConfig) Decrypt(decrypter decrypter) error {
if p.Github == nil {
return nil

Check warning on line 242 in pkg/model/project.go

View check run for this annotation

Codecov / codecov/patch

pkg/model/project.go#L242

Added line #L242 was not covered by tests
}
if err := p.Github.Decrypt(decrypter); err != nil {
return err
}
return nil
return p.Github.Decrypt(decrypter)
}

// GenerateAuthCodeURL generates an auth URL for the specified configuration.
Expand Down

0 comments on commit d3086a0

Please sign in to comment.