ocis
ocis copied to clipboard
Listing activities with limit doesn't handle sorting correctly
Describe the bug
When listing activities with a limit,the limit is applied, but the sorting order is not correctly handled.
Steps to Reproduce:
- Have a list of 10 activities.
- Set a limit of 5 activities.
- Set the sort query to
desc.
Expected Behavior:
The API should sort all activities and then return the last 5 activities when the sort query is set to desc.
Actual Behavior: The API sorts the activities but returns the first 5 activities, ignoring the correct subset of activities that should be returned after sorting.