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 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