mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-25 07:49:37 +02:00
Update backend/server/adventures/views/collection_view.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
43b8275fc1
commit
937c3c6a68
1 changed files with 1 additions and 2 deletions
|
@ -22,8 +22,7 @@ class CollectionViewSet(viewsets.ModelViewSet):
|
|||
order_by = self.request.query_params.get('order_by', 'name')
|
||||
order_direction = self.request.query_params.get('order_direction', 'asc')
|
||||
|
||||
valid_order_by = ['name', 'upated_at', 'start_date']
|
||||
if order_by not in valid_order_by:
|
||||
valid_order_by = ['name', 'updated_at', 'start_date']
|
||||
order_by = 'updated_at'
|
||||
|
||||
if order_direction not in ['asc', 'desc']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue