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

Update user profile api endpoint to users?profile=true in script.js #1

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const callAnalytics = (email) => {
const getRDSEmail = async () => {
const email = await axios
.get(
"https://api.realdevsquad.com/users/self?private=true",
"https://api.realdevsquad.com/users?profile=true",

Choose a reason for hiding this comment

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

So what is private=true meant here?
Is the response of /self?private=true and
/users?profile=true the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I read the website-api-contracts since i have to make changes there too. In it was mentioned that when the /self?private=true is used it will also send the phone number and email in the object that is being sent back. and /users?profile=true is a alternative for the deprecated api endpoint /users/self

These are the outputs for each one of those:

/self?private=true

sels private=true

/users?profile=true

user profile=true

The output is same in both cases

Choose a reason for hiding this comment

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

Are the details like email or phone being used in the project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Phone i am sure is not being used as far as i have inspected the code. But the email is input by the user on frontend, so it might be used to verify if the user is on RDS or not.

{ withCredentials: true },
{
headers: {
Expand Down