Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Ajouter de la vérification pour le tri de EventService.GetEvents

Open Beginner friendly
#78 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
api, backend

Research direction

Start at EventService.GetEvents and follow the sort parameter from the controller action that calls it, so you can see where the raw column name arrives and how the query is built. Pick one of the two suggested approaches: an enum of sortable keys serialized as text, or an internal allow-list that throws a dedicated exception. Done means an invalid sort value yields a 400 Bad Request handled by the controller instead of an unhandled 500, with a test covering both a valid and an invalid key.

Written by the indexing model from the issue text.

Description

:1st_place_medal: good first issue :cowboy_hat_face: refactor :roller_coaster: enhancement

Présentement, on peut rentrer n'importe quelle colonne du schéma de donnée (ou même n'importe quoi, en fait). Donc, si la valeur n'est pas valide, ça va lancer lancer une exception non gérée (donc, code 500) alors que ça devrait indiquer 400 (Bad Request).

Pistes de solution:

  • Restreindre les clés disponibles à l'aide d'une énumération qui se sérialisera sous forme de texte, puis récupérer la propriété sur laquelle trier en conséquence
  • Restreindre les clés disponibles à l'aide d'une liste interne au service. Si le nom n'est pas trouvé, lancer une exception qui devra être géré par le contrôleur.
Dominant language
C#
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ApplETS/Backend-Hello

All issues in ApplETS/Backend-Hello

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.