Class MenuItemReviewController
java.lang.Object
edu.ucsb.cs156.dining.controllers.ApiController
edu.ucsb.cs156.dining.controllers.MenuItemReviewController
@RequestMapping("/api/menuitemreviews")
@RestController
public class MenuItemReviewController
extends ApiController
This is a REST controller for MenuItemReview
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpostMenuItemReview
(long itemId, LocalDateTime itemServedDate, int rating, String reviewText) Create a new menu item review -> all usersMethods inherited from class edu.ucsb.cs156.dining.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
Constructor Details
-
MenuItemReviewController
public MenuItemReviewController()
-
-
Method Details
-
postMenuItemReview
@PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/post") public MenuItemReview postMenuItemReview(@RequestParam long itemId, @RequestParam("itemServedDate") @DateTimeFormat(iso=DATE_TIME) LocalDateTime itemServedDate, @RequestParam int rating, @RequestParam String reviewText) throws com.fasterxml.jackson.core.JsonProcessingException Create a new menu item review -> all users- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-