anitab-org / anitab-org/mentorship-backend

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

未关闭
#420 10 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Category: Coding Hacktoberfest Status: Available Type: Enhancement
主要语言
Python
星标
200
派生
449
PR 合并指标
30 天内没有已合并 PR

描述

## 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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。