Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
bug(metabase): correct response body for get permission group request
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvatt committed Aug 8, 2024
1 parent d969551 commit 69489a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/service/core/api/http/http_metabase.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,16 +368,14 @@ func (c *metabaseAPI) MapSemanticType(ctx context.Context, fieldID int, semantic
func (c *metabaseAPI) GetPermissionGroups(ctx context.Context) ([]service.MetabasePermissionGroup, error) {
const op errs.Op = "metabaseAPI.GetPermissionGroups"

Check warning on line 369 in pkg/service/core/api/http/http_metabase.go

View check run for this annotation

Codecov / codecov/patch

pkg/service/core/api/http/http_metabase.go#L368-L369

Added lines #L368 - L369 were not covered by tests

groups := struct {
Data []service.MetabasePermissionGroup `json:"data"`
}{}
groups := []service.MetabasePermissionGroup{}

Check warning on line 371 in pkg/service/core/api/http/http_metabase.go

View check run for this annotation

Codecov / codecov/patch

pkg/service/core/api/http/http_metabase.go#L371

Added line #L371 was not covered by tests

err := c.request(ctx, http.MethodGet, "/permissions/group", nil, &groups)
if err != nil {
return nil, errs.E(op, err)

Check warning on line 375 in pkg/service/core/api/http/http_metabase.go

View check run for this annotation

Codecov / codecov/patch

pkg/service/core/api/http/http_metabase.go#L373-L375

Added lines #L373 - L375 were not covered by tests
}

return groups.Data, nil
return groups, nil

Check warning on line 378 in pkg/service/core/api/http/http_metabase.go

View check run for this annotation

Codecov / codecov/patch

pkg/service/core/api/http/http_metabase.go#L378

Added line #L378 was not covered by tests
}

func (c *metabaseAPI) GetOrCreatePermissionGroup(ctx context.Context, name string) (int, error) {
Expand Down

0 comments on commit 69489a9

Please sign in to comment.