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

[FEATURE] - Create a Next Admin Client #489

Open
cregourd opened this issue Nov 19, 2024 · 0 comments
Open

[FEATURE] - Create a Next Admin Client #489

cregourd opened this issue Nov 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cregourd
Copy link
Collaborator

Summary

To avoid passing the prisma and options twice, to the getNextAdminProps and createHandler functions. Create a function that retrieves these two parameters and returns a pre-initialized version of getNextAdminProps and createHandler. This will prevent people from forgetting to put options in both functions and leading to strange problems.

Basic Example

// nextadmin.ts
export const nextAdmin = initNextAdmin({
  prisma,
 options
}) 
// => {getNextAdminProps, createHandler}

Drawbacks

No response

Unresolved questions

No response

@cregourd cregourd added the enhancement New feature or request label Nov 19, 2024
@cregourd cregourd changed the title [FEATURE] - Make a Next Admin Client [FEATURE] - Create a Next Admin Client Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant