Class ItemController

java.lang.Object
edu.ntnu.idatt2106_2023_06.backend.controller.ItemController
All Implemented Interfaces:
IItemController

@RestController @CrossOrigin("*") @RequestMapping("/item") public class ItemController extends Object implements IItemController
This class represents the REST controller for managing items in a fridge and shopping list. It handles requests related to adding, retrieving, and deleting items from a fridge and a shopping list.
  • Constructor Details

    • ItemController

      public ItemController()
  • Method Details

    • addUnitToExistingItems

      @PostMapping("/addUnits") public org.springframework.http.ResponseEntity<Object> addUnitToExistingItems()
      This method adds amount and unit to existing items.
      Specified by:
      addUnitToExistingItems in interface IItemController
      Returns:
      ResponseEntity indicating whether the operation was successful or not.