3PillarGlobal-Czechia / interview-app-api

API for Interview App.
MIT License
3 stars 1 forks source link

API: Difficulty attribute update part 2 #98

Open PlesnikJakub opened 2 years ago

PlesnikJakub commented 2 years ago

Description

In #75 we implemented a range validator for the difficulty attribute of the Question object. The existing solution is great for validation on API but we should also extend our domain of such rules so the domain is holding the business rules.

in CreateQuestionInput.cs and UpdateInterviewQuestionInput.cs:

Furthermore, a similar rule can be added to the infrastructure layer of the EF entity.

[Range(0,100)]
public int Difficulty { get; set; }

Acceptance Criteria

Want to work on this issue?

Amazing! 🌞 Let us know in the comment below and we will assign it to you. Don't hesitate to ask for more info. We are here to help.

RiviWickramarachchi commented 1 year ago

Hi. Can I work on this issue ?