Closed marcospri closed 1 week ago
For:
Expose a API endpoint to list courses with pagination.
The intended use case is to list the courses in a drop down menu or similar to allow for filtering.
http://localhost:8001/api/dashboard/courses?limit=2
{ "courses": [ { "id": 1883, "title": "Copy of Developer Test Course with Sections Enabled (With Pags)" }, { "id": 1829, "title": "Course copy LTI1.3" } ], "pagination": { "next": "http://localhost:8001/api/dashboard/courses?cursor=%5B%22Course+copy+LTI1.3%22%2C+1829%5D&limit=2" } }
next
Removed the base64-ing of the cursor
Also added the right type annotation to the method that build the pagination parameters. It doesn't takte a list of courses but rather a queryset (just Query[Course] in SQLA)
For:
Expose a API endpoint to list courses with pagination.
The intended use case is to list the courses in a drop down menu or similar to allow for filtering.
Example response
http://localhost:8001/api/dashboard/courses?limit=2
Testing
next
parameter in the response.