Rename categories to consentCategories
Exclude the UNCATEGORISED category at the SQL level so the admin cookie/display/translations pages only see consent-relevant categories. Removes dead client-side UNCATEGORISED filters that are no longer needed. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -43,8 +43,8 @@ func (r *cookieBannerResolver) Organization(ctx context.Context, obj *types.Cook
|
||||
return types.NewOrganization(organization), nil
|
||||
}
|
||||
|
||||
// Categories is the resolver for the categories field.
|
||||
func (r *cookieBannerResolver) Categories(ctx context.Context, obj *types.CookieBanner, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.CookieCategoryOrderBy) (*types.CookieCategoryConnection, error) {
|
||||
// ConsentCategories is the resolver for the consentCategories field.
|
||||
func (r *cookieBannerResolver) ConsentCategories(ctx context.Context, obj *types.CookieBanner, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.CookieCategoryOrderBy) (*types.CookieCategoryConnection, error) {
|
||||
if err := r.authorize(ctx, obj.ID, probo.ActionCookieCategoryList); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ type CookieBanner implements Node {
|
||||
|
||||
organization: Organization @goField(forceResolver: true)
|
||||
|
||||
categories(
|
||||
consentCategories(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
|
||||
Reference in New Issue
Block a user