Blame | Last modification | View Log | RSS feed
package com.spice.profitmandi.web.v2.controller;import com.spice.profitmandi.web.controller.ShopController;import com.spice.profitmandi.web.v2.response.ApiResponse;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.http.ResponseEntity;import org.springframework.web.bind.annotation.*;import javax.servlet.http.HttpServletRequest;@RestController@RequestMapping("/v2")public class V2ShopController extends V2BaseController {@Autowiredprivate ShopController shopController;@PostMapping("/shop")public ResponseEntity<ApiResponse<?>> createShop(HttpServletRequest request) throws Throwable {return wrapResponse(shopController.createShop(request));}@GetMapping("/shop/id")public ResponseEntity<ApiResponse<?>> getById(HttpServletRequest request,@RequestParam(name = "id") int id) throws Throwable {return wrapResponse(shopController.getById(request, id));}@DeleteMapping("/shop/id")public ResponseEntity<ApiResponse<?>> removeById(HttpServletRequest request,@RequestParam(name = "id") int id) throws Throwable {return wrapResponse(shopController.removeById(request, id));}}