ScotterMonk / scottswain

This project is in support of efforts to hire python engineers.
MIT License
0 stars 0 forks source link

Issue 06-Implement the profile route #9

Closed ScotterMonk closed 1 week ago

ScotterMonk commented 1 week ago

We Need to See User Profiles

Background

Our application currently lacks a robust way to retrieve and display detailed user profiles. The existing /profile route is a placeholder and doesn't provide actual user information.

Business Need

We need to implement a comprehensive user profile route to enhance user management capabilities and improve overall user experience. This will support various features such as user administration, personalization, and data accuracy verification.

Requirements

  1. Create a new route /user-profile that returns full user profile information.
  2. Allow profile retrieval by either email or username for flexibility and ease.
  3. Include all relevant user information from the User model (excluding sensitive data like passwords).
  4. Ensure proper error handling for non-existent users.

Acceptance Criteria

Priority

Medium - This feature is important for improving our user management capabilities but is not blocking any critical functionality.

Estimated Effort

1000 - 1200 hours.

Additional Notes

Consult with the security team to ensure we're not exposing any sensitive information through this new route.

ScotterMonk commented 1 week ago

PR https://github.com/ScotterMonk/scottswain/pull/10

Got profile route working.

How to use it

Bash

(Note: you can leave either username or email empty, only one is required to find user profile.)

curl -X POST http://127.0.0.1:5000/profile \
     -H "Content-Type: application/json" \
     -d '{"username":"Scott Swain", "email":""}'

Windows

Invoke-WebRequest -Uri http://127.0.0.1:5000/profile -Method POST -Headers @{"Content-Type" = "application/json"} -Body '{"username":"Scott Swain", "email":""}'

Changed files:

Needs fulfilled