Skip to content

Commit 6d4a151

Browse files
committed
fix(task): add sorting by create date (fixes #40)
1 parent 2338195 commit 6d4a151

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

routers/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def api_get_tasks(
193193
):
194194
tasks = []
195195
if customer_id is not None:
196-
tasks = list(map(int, str_to_list(api_call('task', 'get_list', f'customer_id={customer_id}{f"&limit={limit}" if limit else ""}{f"&offset={skip}" if skip else ""}')['list'])))
196+
tasks = list(map(int, str_to_list(api_call('task', 'get_list', f'customer_id={customer_id}&order_by=date_add&{f"&limit={limit}" if limit else ""}{f"&offset={skip}" if skip else ""}')['list'])))
197197
if (limit or skip) and get_count:
198198
tasks_count = api_call('task', 'get_list', f'customer_id={customer_id}')['count']
199199
else:

0 commit comments

Comments
 (0)