anitab-org / anitab-org/mentorship-backend

Add query parameter to sort users for GET /users and GET /users/verified APIs

Đang mở
#420 10 bình luận 0 reaction 0 người được giao Xem trên GitHub
Category: Coding Hacktoberfest Status: Available Type: Enhancement
Ngôn ngữ chính
Python
Star
200
Fork
449
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Description

As a user of the app,
I need to have ordering capabilities,
so that I can order the users by certain attributes.

APIs used to fetch Users, don't have an option to be sorted by a certain attribute. We want to be able to filter users by name (alphabetically order) and creation date. Both should have ascending and descending order option. The idea is having a "order" parameter.

Example of order:
"name_asc" = order by name alphabetically order ascending
"name_desc" = order by name alphabetically order descending

This ^^ is just a suggestion, up for dicsussion

Please, commit your change using our [Commit message Style Guide](https://github.com/systers/mentorship-backend/wiki/Commit-Message-Style-Guide).

## Acceptance Criteria
### Update [Required]
- [ ] Add a query parameter support to GET /users, to order users by name and creation date (both ascending and descending order).
- [ ] Update Swagger UI documentation for this API.
- [ ] Write at least one test to prove your new feature is working.

## Definition of Done
- [ ] All of the required items are completed.
- [x] Approval by 1 mentor.

## Estimation
4 hours

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.