-
Notifications
You must be signed in to change notification settings - Fork 54
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
refactors answers codes to parse user data from jwt token. Moves pars… #274
refactors answers codes to parse user data from jwt token. Moves pars… #274
Conversation
Integration/webapp: Navlink.js contact us -> disclaimer
Integration/webapp hide language menu side bar
Production release
Update navLink.json: navlink.js update
Integration/webapp: Televideo Release
Production release: Televideo Release
Integration/webapp: Funtional Twitter Button Share Social
…-button Add Televideo button to patient facing board and fix some mobile styling for social menu
…ub.com:nthopinion/covid19 into integration/webapp
Multiple Answers to a question release to prod
Production release Merge to Master 04262020
Fix unanswered question secttion, Answer saving issue
Fix unanswered question secttion, Answer saving issue release Patch
Production release 04282020-Fix Unanswered question section
Fix delete questions patch refactorQnA Test
Integration/webapp
Question Like sort, images, grouping QnAs closer
Question Like sort, images, grouping QnAs closer -release#250
Develop/refactor qna Hide login
Integration/webapp Hide signup option
Add login infor redirect Test
Add login infor redirect Prod release
Add login infor redirect-Master
Physician Regstration API and User Verification - Test
Physician Regstration API and User Verification-Prod Release
logout unregistered users
logout unregistered users-Master
logout unregistered users-Prod
Production release
…eToken to seperate file to be imported to avoid duplication
user.profilestatus = "level 0"; | ||
user.fullname = item.given_name + " " + item.family_name; | ||
user.b2cid = item.sub; | ||
user.lastsignintime = item.auth_time; | ||
user.email = item.emails[0]; |
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.
better to use camelCase
variable naming. Will make our code consistent
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.
Hi @aviskarkc10 The class variables for the class user is matched with how the fields in the NoSQL container. CosmosDB is case sensitive. In C# we can map the class variable to database field , not sure how it is in node.js, so kept exactly the same. That is my code. We can discuss more in slack. Thanks
|
||
const userDetails = { | ||
id: userData.id, | ||
name: userData.anonymous ? userData.fullname : null |
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.
shouldn't name be null when anonymous
is true? I am thinking this should be reversed?
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.
Hi @aviskarkc10 If anonymous, we should call it "Anonymous". I am going to merge this code from Alex to test and test. Thanks Jay
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.
This will be reversed. I will make this change.
const userDetails = {
id: userData.id,
name: userData.anonymous ? "Dr. Anonymous" : userData.fullname
}
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.
Yes this should be reversed. Sorry!
…eToken to seperate file to be imported to avoid duplication
Motivation
Relating to this trello board task, and this issue, and maybe this issue too?
Implementation
parsetoken
(renamed to camel case) to separate file (common.js
) to be imported by bothuserList.js
andquestionList.js
parseAnswer
logic to read user data from jwt tokenaddAnswer
andeditAnswer
to use the new user data fields generated byparseAnswer
To do
Unknowns