diff options
Diffstat (limited to 'Backend/Api')
-rw-r--r-- | Backend/Api/Api/Services/PostService.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Backend/Api/Api/Services/PostService.cs b/Backend/Api/Api/Services/PostService.cs index 1c8f647..5a285e5 100644 --- a/Backend/Api/Api/Services/PostService.cs +++ b/Backend/Api/Api/Services/PostService.cs @@ -394,19 +394,19 @@ namespace Api.Services { if (ratingFrom >= 0) { - ls = ls.FindAll(post => post.ratings > ratingFrom).ToList(); + ls = ls.FindAll(post => Math.Floor(post.ratings) >= ratingFrom).ToList(); } if (ratingTo >= 0) { - ls= ls.FindAll(post => post.ratings < ratingTo).ToList(); + ls= ls.FindAll(post => Math.Ceiling(post.ratings) <= ratingTo).ToList(); } if (viewsFrom >= 0) { - ls = ls.FindAll(post => post.views >viewsFrom).ToList(); + ls = ls.FindAll(post => post.views >=viewsFrom).ToList(); } if (viewsTo >= 0) { - ls = ls.FindAll(post => post.views < viewsTo).ToList(); + ls = ls.FindAll(post => post.views <= viewsTo).ToList(); } } |