mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 04:01:10 +00:00
Aligns the audio rating validation with the book rating
This commit is contained in:
1 parent
7534155f0e
commit
51d7558eb3
3 files changed
+193
No files matched your search
+2
@@ -45,6 +45,8 @@ public class AudioRating : Rating
|
||||
/// </returns>
|
||||
public static Result<AudioRating> Create(decimal value, decimal maxValue, Optional<AudioRatingSource> source, Optional<int> voteCount)
|
||||
{
|
||||
if (maxValue < 0 || value < 0)
|
||||
return Errors.Metadata.RatingValueMustBePositive;
|
||||
if (value > maxValue)
|
||||
return Errors.Metadata.RatingValueCannotBeGreaterThanMaxValue;
|
||||
|
||||
|
||||
Reference in new issue
Block a user