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

FEAT: Implement Reactivate Profile Endpoint #183

Open
Micah-Shallom opened this issue Jul 29, 2024 · 0 comments
Open

FEAT: Implement Reactivate Profile Endpoint #183

Micah-Shallom opened this issue Jul 29, 2024 · 0 comments
Assignees
Labels

Comments

@Micah-Shallom
Copy link
Contributor

Title: Implement Reactivate Profile Endpoint

Description:

Develop and implement a new API endpoint to allow users to reactivate their profiles. Upon reactivation, an email with a token will be sent to the user for verification.

Endpoint: PATCH /api/v1/profile/reactivate

Requirements:

  1. Endpoint Definition:

    • Method: PATCH
    • URL: /api/v1/profile/reactivate
    • Authentication: Required (JWT token)
  2. Request Body:

    • No additional body parameters required.
  3. Response:

    • Success (200 OK):
      {
        "message": "Profile reactivation email sent"
      }
    • Failure:
      • 401 Unauthorized: If the user is not authenticated.
      • 500 Internal Server Error: If there is an error reactivating the profile.
  4. Error Handling:

    • Provide meaningful error messages for failures.
  5. Security Considerations:

    • Use HTTPS for all communications to protect sensitive data.
    • Ensure only authenticated users can reactivate their profiles.
    • Implement rate limiting to prevent abuse of the reactivation process.

Steps:

  1. Backend Implementation:

    • Create the reactivateProfileHandler function to handle the logic for reactivating the profile.
    • Authenticate the user using the JWT token.
    • Send a reactivation email with a token to the user's registered email address.
    • Return appropriate success or error responses.
  2. Testing:

    • Write unit tests for the reactivateProfileHandler.
    • Write integration tests to ensure the endpoint works as expected.
  3. Documentation:

    • Update the API documentation to include details about the new endpoint and response formats.

@Micah-Shallom Micah-Shallom self-assigned this Jul 29, 2024
@Cyberguru1 Cyberguru1 self-assigned this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants