From 485ff6236d9b67c86d4aeee74111e11e308699c6 Mon Sep 17 00:00:00 2001 From: hskoo Date: Sun, 21 Nov 2021 19:39:19 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20E7-S3=20=EB=A7=B5=ED=95=91=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=20=EB=B3=80=EA=B2=BD=20#99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ciat/category/controller/CategoryController.java | 10 +++++----- .../infp/ciat/category/controller/MenuController.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/com/infp/ciat/category/controller/CategoryController.java b/backend/src/main/java/com/infp/ciat/category/controller/CategoryController.java index 7be5cba..124e28c 100644 --- a/backend/src/main/java/com/infp/ciat/category/controller/CategoryController.java +++ b/backend/src/main/java/com/infp/ciat/category/controller/CategoryController.java @@ -19,30 +19,30 @@ public class CategoryController { private final CategoryService categoryService; - @PostMapping("/category") + @PostMapping("/api/v1/category") public ResponseEntity newCategory(@RequestBody CategorySaveRequestDto requestDto, @AuthenticationPrincipal PrincipalDetails principalDetails) { CategoryDto newCategory = categoryService.create(requestDto, principalDetails.getAccount()); return new ResponseEntity<>(newCategory, HttpStatus.CREATED); } - @GetMapping("/category") + @GetMapping("/api/v1/category") public ResponseEntity> categoryList() { return new ResponseEntity<>(categoryService.getList(), HttpStatus.OK); } - @GetMapping("/category/{id}") + @GetMapping("/api/v1/category/{id}") public ResponseEntity getOneCategory(@PathVariable Long id) { return new ResponseEntity<>(categoryService.getDetail(id), HttpStatus.OK); } - @PutMapping("/category/{id}") + @PutMapping("/api/v1/category/{id}") public ResponseEntity updateCategory(@PathVariable Long id, @RequestBody CategoryUpdateRequestDto requestDto, @AuthenticationPrincipal PrincipalDetails principalDetails) { Long updateResult = categoryService.update(id, requestDto, principalDetails.getAccount()); return new ResponseEntity<>(updateResult, HttpStatus.OK); } - @PatchMapping("/category/{id}") + @PatchMapping("/api/v1/category/{id}") public ResponseEntity deleteCategory(@PathVariable Long id) { return new ResponseEntity<>(categoryService.delete(id), HttpStatus.OK); } diff --git a/backend/src/main/java/com/infp/ciat/category/controller/MenuController.java b/backend/src/main/java/com/infp/ciat/category/controller/MenuController.java index 4721382..b28a6cc 100644 --- a/backend/src/main/java/com/infp/ciat/category/controller/MenuController.java +++ b/backend/src/main/java/com/infp/ciat/category/controller/MenuController.java @@ -19,28 +19,28 @@ public class MenuController { @Autowired MenuService menuService; - @PostMapping("/menu") + @PostMapping("/api/v1/menu") public ResponseEntity newMenu(@RequestBody MenuSaveRequestDto requestDto, @AuthenticationPrincipal PrincipalDetails principalDetails) { MenuDto newMenu = menuService.create(requestDto, principalDetails.getAccount()); return new ResponseEntity<>(newMenu, HttpStatus.CREATED); } - @GetMapping("/menu") + @GetMapping("/api/v1/menu") public ResponseEntity> menuList() { return new ResponseEntity<>(menuService.getList(), HttpStatus.OK); } - @GetMapping("/menu/{id}") + @GetMapping("/api/v1/menu/{id}") public ResponseEntity getOneMenu(@PathVariable Long id) { return new ResponseEntity<>(menuService.getDetail(id), HttpStatus.OK); } - @PutMapping("/menu/{id}") + @PutMapping("/api/v1/menu/{id}") public ResponseEntity updateMenu(@PathVariable Long id, @RequestBody MenuUpdateRequestDto requestDto, @AuthenticationPrincipal PrincipalDetails principalDetails) { return new ResponseEntity<>(menuService.update(id, requestDto, principalDetails.getAccount()), HttpStatus.OK); } - @PatchMapping("/menu/{id}") + @PatchMapping("/api/v1/menu/{id}") public ResponseEntity deleteMenu(@PathVariable Long id) { return new ResponseEntity<>(menuService.delete(id), HttpStatus.OK); }