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-#418: Added role type in frontend and backend #422

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

AMS003010
Copy link
Contributor

Summary

I have added the role type (as an enum) in both the backend and frontend and replaced the "USER" and "ADMIN" types with Role.User and Role.Admin

Description

Explain in detail what this PR is all about. This should include the problem you're solving, the approach taken, and any technical details that reviewers need to know.

Images

None

Issue(s) Addressed

Closes Issue #418

Prerequisites

Copy link

vercel bot commented Jun 18, 2024

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

Name Status Preview Comments Updated (UTC)
wanderlust ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 3:52am
wanderlust-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 3:52am

Copy link

Hey @AMS003010! Thanks for sticking to the guidelines! High five! 🙌🏻

Copy link
Owner

@krishnaacharyaa krishnaacharyaa left a comment

Choose a reason for hiding this comment

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

image

I see "ADMIN" being used in 6 files, but only 4 are touched.

image And "USER" being used in 4 files, only 3 are touched,

Kindly make sure everything is covered before raising PR, else we have to cross check this way :)

Copy link
Owner

@krishnaacharyaa krishnaacharyaa left a comment

Choose a reason for hiding this comment

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

Kindly make sure if the application is completely running without errors, because i straight away see, compilation issue. Didn't it catch while linting? If not kindly let me know... while commit it should ideally run the eslint --fix . and give errors, not sure how this slided from there

backend/middlewares/auth-middleware.js Show resolved Hide resolved
backend/controllers/user-controller.js Show resolved Hide resolved
@krishnaacharyaa
Copy link
Owner

Hi @AMS003010 can you kindly address the review comments and close this by today?

Copy link
Owner

Choose a reason for hiding this comment

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

I still doubt if this is working, because the backend is not still not ts compatible, how where you able to define tsx?
Did it compile succesfully? It ideally shouldn't @AMS003010 .
Or you might have just refactored and didn't actually run the application. Correct?

I'm confused how the builds are passing !!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I actually didn't run the application 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me just see...

@krishnaacharyaa
Copy link
Owner

Yeah I actually didn't run the application 😅

@AMS003010 kindly run the application and push the required changes

@krishnaacharyaa
Copy link
Owner

@AMS003010 did you run the application?

@krishnaacharyaa
Copy link
Owner

@AMS003010

@AMS003010
Copy link
Contributor Author

AMS003010 commented Jun 20, 2024

@krishnaacharyaa
Yeah I did
It worked without any errors

Copy link
Owner

@krishnaacharyaa krishnaacharyaa left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@krishnaacharyaa krishnaacharyaa merged commit 954593b into krishnaacharyaa:main Jun 20, 2024
3 checks passed
@krishnaacharyaa krishnaacharyaa added gssoc Issue can be taken under GSSoC level1 labels Jun 20, 2024
@AMS003010
Copy link
Contributor Author

@krishnaacharyaa Thanks a lot for the help 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc Issue can be taken under GSSoC level1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Adding user type in frontend
2 participants