Small fixes for trust center

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-08-05 09:51:44 +02:00
parent 2c3370026d
commit 7e59504462
2 changed files with 3 additions and 3 deletions

View File

@@ -2941,7 +2941,7 @@ func (r *queryResolver) Viewer(ctx context.Context) (*types.Viewer, error) {
// TrustCenters is the resolver for the trustCenters field.
func (r *queryResolver) TrustCenters(ctx context.Context, first *int, after *page.CursorKey, last *int, before *page.CursorKey, filter *types.TrustCenterFilter) (*types.TrustCenterConnection, error) {
panic(fmt.Errorf("not implemented: TrustCenters - trustCenters"))
return nil, fmt.Errorf("not implemented: TrustCenters - trustCenters")
}
// DownloadURL is the resolver for the downloadUrl field.

View File

@@ -46,8 +46,8 @@ func GetCurrentUserRole(ctx context.Context, accessor ContextAccessor) types.Rol
return types.RoleNone
}
func MustBeAuthenticatedDirective(accessor ContextAccessor) func(ctx context.Context, obj interface{}, next graphql.Resolver, role *types.Role) (interface{}, error) {
return func(ctx context.Context, obj interface{}, next graphql.Resolver, role *types.Role) (interface{}, error) {
func MustBeAuthenticatedDirective(accessor ContextAccessor) func(ctx context.Context, obj any, next graphql.Resolver, role *types.Role) (any, error) {
return func(ctx context.Context, obj any, next graphql.Resolver, role *types.Role) (any, error) {
currentRole := GetCurrentUserRole(ctx, accessor)
if role != nil && *role == types.RoleUser && currentRole == types.RoleNone {