anand-harsh / Edumi

Edumi, Place to learn and grow skills with proper maintenance
https://edumi.vercel.app/
9 stars 29 forks source link

Feature Addition: User Details Update API Endpoint #118

Closed JavidSumra closed 4 months ago

JavidSumra commented 4 months ago

Description: This pull request proposes the addition of a new API endpoint /api/user/details/update to facilitate updating user details. The current system lacks this functionality, hindering users from modifying their information.

Issue : #117

Changes Proposed:

  1. Update User Details Endpoint:

    • Description: Introduces a PUT endpoint to update user details including name, email, organization, contact number, address, office address, and social media profiles.
    • URL: PUT /api/user/details
    • Request Body: JSON object containing user details to be updated.
    • Response: Returns the updated user details upon successful modification.
  2. Request Body Schema:

    • Defines the structure of the request body to ensure consistency and validate incoming data.
  3. Authentication and Authorization:

    • Ensures appropriate authentication mechanisms are implemented to safeguard user data.
    • Authorizes requests based on user privileges to prevent unauthorized access.
  4. Validation:

    • Validates request data to ensure completeness and correctness (e.g., email format, phone number format) before processing.

Benefits:

Note: For Now this Route Just Update name and email because other fields are not present in DB.

This pull request aligns with the project's Contributing Guidelines and addresses the identified problem effectively.

Please review and provide feedback. Thank you.

image

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
edumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 7, 2024 0:54am
JavidSumra commented 4 months ago

Hey @anand-harsh Please Check My PR.