Closed aike-ps closed 4 years ago
Could you please merge this together with the other merge request you did. (#634)
One thing I am thinking about is that you cahnged the default value. With get
the default value if the property does not exist is null
and the default value of getInt
is 0
so there is no way of differenticating between not rated and rated very badly.
Yes, now not working at all, good luck )))
AddProductReviewByCode
public function __construct(
string $productCode,
string $channelCode,
string $title,
**int $rating,**
string $comment,
string $email
)
Thanks for pointing that out. Yes the store rating hast to be an integer but the fact that field is filled with something other than null should be validated at the request level. So if you create a review without giving it a rating then the validator should return a 400 and never trigger the command.
Fix bug. Rating must be only Int.