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

Refactor Routes and Models into Separate Files #200

Open
4 tasks done
0vai5 opened this issue Oct 9, 2024 · 5 comments · May be fixed by #213
Open
4 tasks done

Refactor Routes and Models into Separate Files #200

0vai5 opened this issue Oct 9, 2024 · 5 comments · May be fixed by #213

Comments

@0vai5
Copy link

0vai5 commented Oct 9, 2024

Description

I want to organize the codebase by separating the user-related routes (such as /login and /register) and the user model into different files. This will enhance the maintainability and clarity of the project structure.

Tasks:

  • Create a new file for the user model (e.g., UserModel.js) in the /models directory.
  • Create a new file for authentication routes (e.g., authRoutes.js) in the /routes directory.
  • Implement the corresponding user registration and login logic in a separate controller file (e.g., authController.js) in the /controllers directory.

Steps to Reproduce:

  • Review the existing code for user routes and models in the main application file.
  • Create the necessary files in the appropriate directories.
  • Move the existing code to the new files while ensuring that everything functions correctly.
  • Expected Behavior: The application should work seamlessly after restructuring, with routes and models organized in separate files.

Actual Behavior:

Currently, routes and models are mixed within the main application file, making the codebase cluttered and harder to manage.

Please assign it to me.
label it as gssoc-ext and level-2

@Kritika30032002

Screenshots

No response

Checklist

  • I have starred the repository
  • I have checked the existing issues
  • I have read the discussion tab thoroughly and got the project idea
  • I am willing to work on this issue (optional)
@0vai5 0vai5 added the enhancement New feature or request label Oct 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

Hey, @0vai5 welcome to Top_Secrets repository.🎊 Thank you so much for taking the time to point this out.🙌

@0vai5
Copy link
Author

0vai5 commented Oct 9, 2024

Please assign this to me @Kritika30032002

@Kritika30032002
Copy link
Owner

By what time you can submit pr for this?

@0vai5
Copy link
Author

0vai5 commented Oct 10, 2024

By what time you can submit pr for this?

By tomorrow night!!

@0vai5 0vai5 linked a pull request Oct 11, 2024 that will close this issue
4 tasks
@0vai5
Copy link
Author

0vai5 commented Oct 11, 2024

@Kritika30032002 I have raised a pr and all tests are done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants