-
Notifications
You must be signed in to change notification settings - Fork 5
236 registration page #241
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
Conversation
…portunities to add new leads. Also attempted to fix registration.
…Backend into 236-registration-page
|
Here's the code health analysis summary for commits Analysis Summary
|
labconnect/main/auth_routes.py
Outdated
| json_data = request.get_json() | ||
| user.first_name = json_data.get("first_name") | ||
| user.last_name = json_data.get("last_name") | ||
| user.preferred_name = json_data.get("preferred_name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some of these we should add default values for example preferred_name should be blank if empty I believe
labconnect/main/auth_routes.py
Outdated
| user.last_name = json_data.get("last_name") | ||
| user.preferred_name = json_data.get("preferred_name") | ||
| user.class_year = json_data.get("class_year") | ||
| user.profile_picture = json_data.get("profile_pictures") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not profile picture is added we should add the default we have been using for test users
labconnect/main/auth_routes.py
Outdated
| def registerUser(): | ||
| user_id = get_jwt_identity() | ||
|
|
||
| user = db.session.execute(db.select(User).where(User.email == user_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be making a new User instead of requesting an existing one, all logic for making a user should be here.
labconnect/main/auth_routes.py
Outdated
| email=user_id, | ||
| first_name=json_data.get("first_name"), | ||
| last_name=json_data.get("last_name"), | ||
| preferred_name=json_data.get("preferred_name"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add major as well
RafaelCenzano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Added registration for new users. I also added the search route for lab managers and the updated create and edit opportunity routes to allow more lab managers to be added.
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist: