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

Conversation

Hariom01010
Copy link
Contributor

Date: 05 Dec 2024

Developer Name: Hariom Vashista


Issue Ticket Number

Real-Dev-Squad/todo-action-items#255 repo number 18

Description

The api endpoint used in script.js in the getRDSEmail function has been updated from "https://api.realdevsquad.com/users?profile=true to "https://api.realdevsquad.com/users?profile=true.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

prodsite
How the page works currently without the user api endpoint

Screenshot 2

localhost
The page works as intended on localhost after changing the api endpoint being used in the script.js file.

Test Coverage

Screenshot 1

Additional Notes

@@ -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.

@prakashchoudhary07 prakashchoudhary07 merged commit 1c14fbe into Real-Dev-Squad:main Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants