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

Code duplication issue for FaunaDB #9

Closed
rishabhpoddar opened this issue Sep 19, 2020 · 0 comments
Closed

Code duplication issue for FaunaDB #9

rishabhpoddar opened this issue Sep 19, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@rishabhpoddar
Copy link
Contributor

The middleware.ts in the faunadb folder has the same code as the middleware.ts file one folder behind.

Is there a way to not have to duplicate all the code here from ../middleware? Simply calling the functions there will not work since we want to call getSession and refreshSession of faunaDB in express.ts in the faunadb folder.

Another related issue is that if there is a function (like auth0Handler) that calls getSession or createNewSession inside of it, we want that to use the ones defined in the faunadb/express.ts (if the user is using faunadb). At the moment, the only way that's possible is by duplicating the logic for auth0Handler.

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