fix: closes #26
This commit is contained in:
		@@ -54,23 +54,22 @@ public class DatasetController {
 | 
			
		||||
    @PutMapping("/id/{id}/upvote")
 | 
			
		||||
    public Dataset upvote(@PathVariable("id") UUID id) {
 | 
			
		||||
        datasetService.upvoteDataset(id);
 | 
			
		||||
        return null;
 | 
			
		||||
        return datasetService.getDatasetById(id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @PutMapping("/id/{id}/downvote")
 | 
			
		||||
    public Dataset downvote(@PathVariable("id") UUID id) {
 | 
			
		||||
        datasetService.downvoteDataset(id);
 | 
			
		||||
        return null; // new ResponseEntity<>(null, HttpStatus.OK);
 | 
			
		||||
        return getDatasetById(id); // new ResponseEntity<>(null, HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @PutMapping("/id/{id}/vote")
 | 
			
		||||
    public String postMethodName(@PathVariable("id") UUID id,
 | 
			
		||||
    public Dataset postMethodName(@PathVariable("id") UUID id,
 | 
			
		||||
            @RequestParam("stars") int stars) {
 | 
			
		||||
        if (stars > 0 && stars < 6) {
 | 
			
		||||
            datasetService.voteDataset(id, stars);
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        return "Invalid vote";
 | 
			
		||||
        return datasetService.getDatasetById(id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @GetMapping
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user