Skip to content

Commit

Permalink
chore: fix veryminimal check in project commands (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Oct 23, 2024
1 parent dbf215d commit 061b0ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/lagoon/client/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (c *Client) UpdateProjectMetadataByName(
if err := c.veryMinimalProjectByName(ctx, name, proj); err != nil {
return err
}
if project.Name == "" {
if proj.Name == "" {
//lint:ignore ST1005 return a generic Lagoon API unauthorized error based on the permission called
// this is because organizationbyname will return null instead of an error, the api should probably return an error
return fmt.Errorf(`Unauthorized: You don't have permission to "view" on "project"`)
Expand Down Expand Up @@ -203,7 +203,7 @@ func (c *Client) RemoveProjectMetadataByKeyByName(
if err := c.veryMinimalProjectByName(ctx, name, proj); err != nil {
return err
}
if project.Name == "" {
if proj.Name == "" {
//lint:ignore ST1005 return a generic Lagoon API unauthorized error based on the permission called
// this is because organizationbyname will return null instead of an error, the api should probably return an error
return fmt.Errorf(`Unauthorized: You don't have permission to "view" on "project"`)
Expand Down Expand Up @@ -237,7 +237,7 @@ func (c *Client) UpdateProjectByName(
if err := c.veryMinimalProjectByName(ctx, name, proj); err != nil {
return err
}
if project.Name == "" {
if proj.Name == "" {
//lint:ignore ST1005 return a generic Lagoon API unauthorized error based on the permission called
// this is because organizationbyname will return null instead of an error, the api should probably return an error
return fmt.Errorf(`Unauthorized: You don't have permission to "view" on "project"`)
Expand Down

0 comments on commit 061b0ce

Please sign in to comment.