You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the lessonId is not provided in the request body, return a 400 Bad Request error.
If the user_id is not found, return a 404 Not Found error.
Notes:
Going to be adding additional logic here to essentially "Lock" lessons that haven't been reached yet. So just keep that in mind while completing this ticket.
The text was updated successfully, but these errors were encountered:
Request:
PATCH /api/user/{user_id}/progress
Ex:
{
"lessonId": 3
}
In this request, lessonId is the ID of the lesson the user has just completed.
Backend Logic:
When a request is received at the PATCH /api/user/{user_id}/progress endpoint:
Here's some pseudo-code to demonstrate the logic:
Response:
The API should respond with the updated or created
Progress
record.{
"id": 456,
"lessonId": 3,
"userId": 12345,
"date": "2023-09-25T12:45:00.000Z"
}
Error Handling:
Notes:
The text was updated successfully, but these errors were encountered: