From cb2fefe55b39979db9f5664568eef8ed25d2e497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=98=84=EC=84=B1=ED=95=84?= Date: Tue, 4 Jul 2023 10:03:15 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=84=B0=20-=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=EC=84=A0=ED=83=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/service/ApiRequestMgmtService.java | 1 + .../resources/templates/page/tester/apiTester.html | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/eactive/httpmockserver/client/service/ApiRequestMgmtService.java b/src/main/java/com/eactive/httpmockserver/client/service/ApiRequestMgmtService.java index 1dbe86e..22b414d 100644 --- a/src/main/java/com/eactive/httpmockserver/client/service/ApiRequestMgmtService.java +++ b/src/main/java/com/eactive/httpmockserver/client/service/ApiRequestMgmtService.java @@ -84,6 +84,7 @@ public class ApiRequestMgmtService { collection.getApis().remove(api); apiCollectionRepository.save(collection); + apiRequestRepository.deleteById(apiId); } } diff --git a/src/main/resources/templates/page/tester/apiTester.html b/src/main/resources/templates/page/tester/apiTester.html index 48f7abb..c0b18fe 100644 --- a/src/main/resources/templates/page/tester/apiTester.html +++ b/src/main/resources/templates/page/tester/apiTester.html @@ -61,9 +61,8 @@
- +
@@ -433,9 +432,8 @@ controller.addQueryParam(idx, '', ''); }); - model.server = target.find('select[name="server"]').val(); target.find('input[name="basePath"]').val(target.find('select[name="server"] option:selected').data('path')); - + target.find('select[name="server"]').val(model.server); target.find('select[name="server"]').on('change', function () { model.server = $(this).val(); let selected = $(this).find('option:selected'); @@ -814,7 +812,7 @@ console.log(model); this.currentAjaxRequest = $.ajax({ - url: '/mgmt/collections/{id}/apis/save.do'.replace('{id}', model.collectionId), + url: '/mgmt/collections/{collectionId}/apis/save.do'.replace('{collectionId}', model.collectionId), type: 'POST', contentType: 'application/json', data: JSON.stringify(model), @@ -840,6 +838,7 @@ headers: [], queryParams: [], requestBody: '', + collectionId : collectionId, responseModel: { status: 0, time: 0, @@ -850,7 +849,7 @@ }; this.currentAjaxRequest = $.ajax({ - url: '/mgmt/collections/{id}/apis/save.do'.replace('{id}', collectionId), + url: '/mgmt/collections/{collectionId}/apis/save.do'.replace('{collectionId}', collectionId), type: 'POST', contentType: 'application/json', data: JSON.stringify(newApi),