Skip to content

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
@github-actions
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
@github-actions github-actions bot added the stale label May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant