CourseLogResource as course logs — free learnings and paid courses share a shape, differing in how they're purchased/assigned. Served by FreeLearningController::index().App\Http\Controllers\Api\V1\Diver\FreeLearningController::index()api.v1.diver.free-learnings.indexAuthorization: Bearer {token}GET/api/v1/diver/free-learnings200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": [
{
"log_code": "9be9084934f36b03bbbb70c38acb9d50",
"course": {
"id": 165,
"name": "Ice",
"group": "recreational",
"need_quiz": true,
"need_exam": true,
"need_skills": true
},
"instructor": null,
"dive_center": null,
"purchase_date": "2022-08-08",
"expire_date": null,
"quiz_lock": false,
"admin_lock": false,
"exam_enable": false,
"is_completed": false
}
]
}_resources.md → "Course log". instructor and dive_center were null in every one of the capture account's 6 free learnings — free learnings are self-enrolled (see POST_enroll.md), so neither is typically assigned.401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated"
}GET /api/v1/diver/courses, this endpoint works — FreeLearningController::index() does not call the missing active()/expired() scopes that break the equivalent courses endpoint. See finding 1 in docs/plans/ApiDocsDiver/findings.md.docs/api/diver/free-learnings/GET_list.mdcurl --location 'https://test.diveraid.com/api/v1/diver/free-learnings' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": [
{
"log_code": "string",
"course": {
"id": 0,
"name": "string",
"group": "string",
"need_quiz": true,
"need_exam": true,
"need_skills": true
},
"instructor": {
"id": 0,
"full_name": "string"
},
"dive_center": {
"id": 0,
"name": "string"
},
"purchase_date": "2019-08-24",
"expire_date": "2019-08-24",
"quiz_lock": true,
"admin_lock": true,
"exam_enable": true,
"is_completed": true,
"is_repetition": true,
"repetition": {
"confirmed_at": "2019-08-24T14:15:22.123Z",
"confirmed_by": {
"id": 0,
"full_name": "string"
}
}
}
]
}