Serendipity2-0 / TradeManV1

0 stars 0 forks source link

Endpoints for admin/profile pages #45

Closed amolkittur closed 1 month ago

amolkittur commented 1 month ago
          Endpoints for profile pages

Originally posted by @amolkittur in https://github.com/Serendipity2-0/TradeManV1/issues/42#issuecomment-2238763216

amolkittur commented 1 month ago

Endpoints for Profile page

amolkittur commented 1 month ago

@Anand-ak7

Please confirm if the implemented changes meet the requirements. Once I receive your approval, I will close this issue.

Anand-ak7 commented 1 month ago

@amolkittur Modify the GET request endpoint /v1/admin/user-details-username to use tr_no instead of a username for fetching user data. Also, update the POST request endpoint to use tr_no instead of user_details to update user details.

amolkittur commented 1 month ago

@Anand-ak7 I have made the changes as requested. Please confirm if the implemented changes meet the requirements.

Anand-ak7 commented 1 month ago

@amolkittur not able to get the user list in this /v1/admin/user-list endpoint

amolkittur commented 1 month ago

@Anand-ak7

I have made the changes and pushed the code. If the dict of the user does not have the field Profile we will get the error along the message which includes the trader number.

Anand-ak7 commented 1 month ago

@amolkittur
Need to retrieve the User Name and ID from the database response in the admin user list endpoint. /v1/admin/user-list

Example:

{ "name": "Anand", "tr_no": "Tr00" }

amolkittur commented 1 month ago

@Anand-ak7 I have made the changes. Let me know if the changes work.

amolkittur commented 1 month ago

Closing this issue as all the tasks required to pass the Phase 1 are complete