Skip to content
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

Add default expose strategy option #37

Merged
merged 2 commits into from
Aug 19, 2022
Merged

Conversation

baptadn
Copy link
Member

@baptadn baptadn commented May 23, 2022

Add defaultExposeStrategy option. If all, all routes are exposed, if none, only the routes specified in the only option are exposed. Default to all.

NextCrud({
  adapter: new PrismaAdapter<User | Post, Prisma.ModelName>({
    prismaClient: myPrismaClient,
  }),
  defaultExposeStrategy: 'none',
  models: {
    [Prisma.ModelName.User]: {
      name: 'users',
      only: [RouteType.READ_ALL],
    },
  },
})

@tlenclos tlenclos requested a review from foyarash May 23, 2022 10:09
@baptadn baptadn force-pushed the feature/default-expose-strategy branch from 4babd20 to 86e2a20 Compare May 23, 2022 10:12
@baptadn baptadn force-pushed the feature/default-expose-strategy branch from 86e2a20 to 5eee6d0 Compare May 23, 2022 10:15
@foyarash foyarash merged commit 2ebddee into master Aug 19, 2022
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.

2 participants