lugenx/ecohabit

Create Endpoint to Fetch User's Answers for a Given Date

Closed this issue · 7 comments

We need to provide an endpoint that retrieves all of a user's answers for a specific date.

  • Endpoint: GET /answers?date=YYYY-MM-DD
    • This endpoint will return all the answers of the authenticated user for the given date.

Acceptance Criteria:

  1. The backend must decode the authentication token to identify the user.
  2. Only data related to the authenticated user should be returned, ensuring data privacy.
  3. Proper error handling should be implemented. For instance, if no answers are available for the specified date or if the token is invalid, appropriate error messages should be returned.
  4. The endpoint's response should be in a consistent and easily parsable format for the frontend.

Note: Implement this endpoint in the answerController.js file.

Can I work on this issue?

Hi @Siva20021, the issue labeled as blocked indicates that it's dependent on another task in the project. It should be available for assignment once PR #251 is merged. in the meantime, please check out other issues you might assist with, or join our discord server to stay updated.

this issue is available now if anybody wants to work on it.

I can work on it

thank you for your interest @aditya4196 , you currently have an open PR, if this issue will still be available after merging your current PR, i will assign this to you.

hello @lugenx can you please assign this issue to me

assigned, thank you!