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

feat: Added admin login logic in backend successfully issue 343 #345

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

MeetDOD
Copy link
Contributor

@MeetDOD MeetDOD commented Jun 30, 2024

Pull Request Resolve [#343 ]

Title: Added admin login logic in backend successfully.

Description

  1. In backend, In prisma at user add new field i.e isAdmin: bool, In routes created admin folder in that i created controllers for adminLogin and fetching admin profile with adminAuth middleware.
  2. Created routes for both and created zodSchema for admin.
  3. Api is tested in postman and in thunder client and is working fine.

Related Issues

Fixes #343

Changes Made

New features: Added admin login logic in backend.

Screenshots

image

image

image

I certify that I have carried out the relevant code of conduct and provided the requisite screenshot for validation by submitting this pull request.

Thank You for this contribution.

Copy link

vercel bot commented Jun 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
style-share ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2024 9:53am

Copy link

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 30, 2024

@VaibhavArora314 assign the necessary GGSOC labels #343
I am creating this because i am not available tomorrow that's why i created the PR first without your permission.
So, please tell me if any changes needed respectively.
Thank You 😀

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jun 30, 2024

@VaibhavArora314 Just explain me the approach of the code like how i code in the different folder admin/frontend because the code is ready without any issue just the folder approach is not cleared to me.

Please explain me.
Thank you 👍

Copy link
Owner

@VaibhavArora314 VaibhavArora314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything looks good, just add verifyJwt logic since you are directly decoding it in admin auth middleware

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 1, 2024

@VaibhavArora314 Done 👍

@VaibhavArora314 VaibhavArora314 merged commit d27acc1 into VaibhavArora314:main Jul 1, 2024
3 checks passed
Copy link

github-actions bot commented Jul 1, 2024

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

@MeetDOD
Copy link
Contributor Author

MeetDOD commented Jul 1, 2024

@VaibhavArora314 I think it deserve level 3 if possible upon evaluation 😀

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

Successfully merging this pull request may close these issues.

[Feature Request]: Creating the admin login in backend
3 participants