feat: Update dataset voting logic to allow for zero stars
This commit is contained in:
parent
474da3091e
commit
1effb09cdb
@ -70,7 +70,7 @@ public class DatasetController {
|
|||||||
if (datasetService.getDatasetById(id) == null) {
|
if (datasetService.getDatasetById(id) == null) {
|
||||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
if (!(stars > 0 && stars < 6)) {
|
if (!(stars >= 0 && stars < 6)) {
|
||||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
datasetService.voteDataset(id, stars);
|
datasetService.voteDataset(id, stars);
|
||||||
|
Loading…
Reference in New Issue
Block a user