Skip to content
Snippets Groups Projects
Commit bbfa96d9 authored by 한동현's avatar 한동현
Browse files

fix: API 중복 조회 버그 수정

parent 3e3bf82c
No related branches found
No related tags found
No related merge requests found
...@@ -39,9 +39,9 @@ export default function ForwardingEdit() { ...@@ -39,9 +39,9 @@ export default function ForwardingEdit() {
authFetch(`/api/forwarding?forwardingId=${id}`) authFetch(`/api/forwarding?forwardingId=${id}`)
.then((response) => { .then((response) => {
if (!response.ok) { if (!response.ok) {
console.error(response);
throw Error(); throw Error();
} }
return response.json(); return response.json();
}) })
.then(({ name, serverPort, instanceIp }) => { .then(({ name, serverPort, instanceIp }) => {
...@@ -55,7 +55,7 @@ export default function ForwardingEdit() { ...@@ -55,7 +55,7 @@ export default function ForwardingEdit() {
console.error(error); console.error(error);
toast.error('포트포워딩 정보를 조회할 수 없습니다.'); toast.error('포트포워딩 정보를 조회할 수 없습니다.');
}); });
}); }, []);
async function onSubmit(values: z.infer<typeof formSchema>) { async function onSubmit(values: z.infer<typeof formSchema>) {
if (!initialData.current) return; if (!initialData.current) return;
...@@ -74,8 +74,6 @@ export default function ForwardingEdit() { ...@@ -74,8 +74,6 @@ export default function ForwardingEdit() {
}); });
if (!response.ok) { if (!response.ok) {
console.error(response);
const { code } = await response.json(); const { code } = await response.json();
if (code == 'DUPLICATED_INSTANCE_INFO') { if (code == 'DUPLICATED_INSTANCE_INFO') {
form.setError('instanceIp', { type: 'custom' }); form.setError('instanceIp', { type: 'custom' });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment