Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add sort to Event list #34

Merged
merged 1 commit into from
Aug 2, 2022
Merged

fix: add sort to Event list #34

merged 1 commit into from
Aug 2, 2022

Conversation

dlsuqin
Copy link
Contributor

@dlsuqin dlsuqin commented Aug 2, 2022

closes #33

@zhubx007 zhubx007 added the bug Something isn't working label Aug 2, 2022
@@ -44,6 +44,7 @@
},
)
def get_all(
sort: int = Query(2, alias="sort", ge=1, description="1=顺序 2=倒序"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use enum desc/asc. Add description like "Only support sort with id"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename sort as sort_dir, alias as sortDir

Copy link
Collaborator

@zhubx007 zhubx007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhubx007 zhubx007 merged commit 50bbf53 into open-v2x:master Aug 2, 2022
zhubx007 pushed a commit that referenced this pull request Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Event management supports custom sorting based on creation time
2 participants