Skip to content

Commit

Permalink
(hotfix) Reducing restriction to access getClubs (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
citorva authored Nov 4, 2024
1 parent 95f7a3f commit f44ba08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/entities/clubs/queries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@

# getClubs

- Can be performed by any user
- Can be performed by any registered user

# getPublicClubs

- Can be performed by any user and guest
- Restrict shown clubs and available operation to the data
2 changes: 1 addition & 1 deletion app/entities/clubs/queries/getClubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resolver } from '@blitzjs/rpc';
type GetClubsInput = Pick<Prisma.ClubFindManyArgs, 'where' | 'orderBy' | 'skip' | 'take'>;

export default resolver.pipe(
resolver.authorize(['*', 'bde']),
resolver.authorize(),
async ({ where, orderBy, skip = 0, take }: GetClubsInput, _ctx) => {
const clubs = await db.club.findMany({
where,
Expand Down

0 comments on commit f44ba08

Please sign in to comment.