adicionado 0 na escal de nota
This commit is contained in:
parent
0bbd04ee45
commit
e8ca410b94
8 changed files with 72 additions and 15 deletions
|
|
@ -53,7 +53,8 @@ func ValidatePedidoInput(in *contratos.PedidoInput) error {
|
|||
|
||||
func ValidatePatchInput(in *contratos.PatchInput) error {
|
||||
if in.Nota != nil {
|
||||
if *in.Nota < 1 || *in.Nota > 10 {
|
||||
// Regra do produto: escala NPS é 0–10.
|
||||
if *in.Nota < 0 || *in.Nota > 10 {
|
||||
return errors.New("nota invalida")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue