Code-4-Community / breaktime

1 stars 0 forks source link

Get user endpoints #13

Closed aditya161216 closed 7 months ago

aditya161216 commented 8 months ago

ℹī¸ Issue Closes #5

📝 Description Briefly list the changes made to the code:

Added support for pulling live user data on frontend by passing in the current user's ID to getUser() and getUsers(). Also fixed the hard-coding of a user's type in UserUtils.tsx.

✔ī¸ Testing What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.

Logged the output for getUser() by checking if the current user is correctly outputted, and created array of test user id's and passed it into getUsers(), checking if the correct array of user objects is outputted. Also ran backend in test mode and used Postman to see if data was pulled correctly.

🏕ī¸ (Optional) Future Work / Notes Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!