메소드 이름 변경
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ public class ApiRequestMgmtController {
|
|||||||
@PostMapping("/mgmt/collections/update.do")
|
@PostMapping("/mgmt/collections/update.do")
|
||||||
public ResponseEntity<String> updateApiCollection(@RequestBody ApiCollectionDTO dto) {
|
public ResponseEntity<String> updateApiCollection(@RequestBody ApiCollectionDTO dto) {
|
||||||
ApiCollection updated = apiRequestMapper.map(dto);
|
ApiCollection updated = apiRequestMapper.map(dto);
|
||||||
apiRequestMgmtService.updateApiCollection(updated.getId(), updated);
|
apiRequestMgmtService.updateApiCollectionName(updated.getId(), updated);
|
||||||
return ResponseEntity.ok(SUCCESS);
|
return ResponseEntity.ok(SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class ApiRequestMgmtService {
|
|||||||
apiCollectionRepository.save(collection);
|
apiCollectionRepository.save(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateApiCollection(String id, ApiCollection updated) {
|
public void updateApiCollectionName(String id, ApiCollection updated) {
|
||||||
ApiCollection collection = apiCollectionRepository.findById(id).orElseThrow(() -> new NotFoundException(String.format(API_COLLECTION_NOT_FOUND, id)));
|
ApiCollection collection = apiCollectionRepository.findById(id).orElseThrow(() -> new NotFoundException(String.format(API_COLLECTION_NOT_FOUND, id)));
|
||||||
collection.setName(updated.getName());
|
collection.setName(updated.getName());
|
||||||
apiCollectionRepository.save(collection);
|
apiCollectionRepository.save(collection);
|
||||||
|
|||||||
Reference in New Issue
Block a user