Skip to content

fix(examples): Update adminsAndUser to use the filter correctly #12175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

allanice001
Copy link

What?

fix the filter for this role

Why?

Using the filter in its current format produces:

Type error: Type '({ req: { user } }: AccessArgs<any>) => boolean | { id: string; }' is not assignable to type 'Access'.
  Type 'boolean | { id: string; }' is not assignable to type 'AccessResult | Promise<AccessResult>'.
    Type '{ id: string; }' is not assignable to type 'AccessResult | Promise<AccessResult>'.
      Type '{ id: string; }' is not assignable to type 'Where'.
        Property 'id' is incompatible with index signature.
          Type 'string' is not assignable to type 'Where[] | WhereField'.

How?

{id: user.id} => {id: {equals: user.id}}

Fixes #
https://discord.com/channels/967097582721572934/1363435593454846054

fix the filter for this role
Copy link
Contributor

github-actions bot commented Apr 21, 2025

Pull Request titles must follow the Conventional Commits specification and have valid scopes.

The subject "Update adminsAndUser to use the filter correctly" found in the pull request title "fix(examples): Update adminsAndUser to use the filter correctly"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.

feat(ui): add Button component
^    ^    ^
|    |    |__ Subject
|    |_______ Scope
|____________ Type

@allanice001 allanice001 changed the title fix(adminAndUsersAccess): Update adminsAndUser to use the filter correctly fix(examples): Update adminsAndUser to use the filter correctly Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant