anitab-org / anitab-org/mentorship-backend

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

Aperta
#420 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Category: Coding Hacktoberfest Status: Available Type: Enhancement
Lingua principale
Python
Stelle
200
Fork
449
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.