feat: Update dataset voting logic to allow for zero stars

This commit is contained in:
Erik Foris 2024-07-06 18:03:27 +02:00
parent 474da3091e
commit 1effb09cdb

View File

@ -70,7 +70,7 @@ public class DatasetController {
if (datasetService.getDatasetById(id) == null) {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
if (!(stars > 0 && stars < 6)) {
if (!(stars >= 0 && stars < 6)) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
datasetService.voteDataset(id, stars);