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() {
authFetch(`/api/forwarding?forwardingId=${id}`)
.then((response) => {
if (!response.ok) {
console.error(response);
throw Error();
}
return response.json();
})
.then(({ name, serverPort, instanceIp }) => {
......@@ -55,7 +55,7 @@ export default function ForwardingEdit() {
console.error(error);
toast.error('포트포워딩 정보를 조회할 수 없습니다.');
});
});
}, []);
async function onSubmit(values: z.infer<typeof formSchema>) {
if (!initialData.current) return;
......@@ -74,8 +74,6 @@ export default function ForwardingEdit() {
});
if (!response.ok) {
console.error(response);
const { code } = await response.json();
if (code == 'DUPLICATED_INSTANCE_INFO') {
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