null로 저장되게 성공시킴
This commit is contained in:
@@ -226,7 +226,7 @@ export function RestApiConnectionModal({ isOpen, onClose, onSave, connection }:
|
||||
endpoint_path: endpointPath || undefined,
|
||||
default_headers: defaultHeaders,
|
||||
default_method: defaultMethod,
|
||||
default_body: defaultBody || undefined,
|
||||
default_body: defaultBody.trim() || null, // 빈 문자열이면 null로 전송하여 DB 업데이트
|
||||
auth_type: authType,
|
||||
auth_config: authType === "none" ? undefined : authConfig,
|
||||
timeout,
|
||||
@@ -236,6 +236,13 @@ export function RestApiConnectionModal({ isOpen, onClose, onSave, connection }:
|
||||
is_active: isActive ? "Y" : "N",
|
||||
};
|
||||
|
||||
console.log("저장하려는 데이터:", {
|
||||
connection_name: connectionName,
|
||||
default_method: defaultMethod,
|
||||
endpoint_path: endpointPath,
|
||||
base_url: baseUrl,
|
||||
});
|
||||
|
||||
if (connection?.id) {
|
||||
await ExternalRestApiConnectionAPI.updateConnection(connection.id, data);
|
||||
toast({
|
||||
@@ -303,7 +310,13 @@ export function RestApiConnectionModal({ isOpen, onClose, onSave, connection }:
|
||||
기본 URL <span className="text-destructive">*</span>
|
||||
</Label>
|
||||
<div className="flex gap-2">
|
||||
<Select value={defaultMethod} onValueChange={setDefaultMethod}>
|
||||
<Select
|
||||
value={defaultMethod}
|
||||
onValueChange={(val) => {
|
||||
setDefaultMethod(val);
|
||||
setTestMethod(val); // 테스트 Method도 동기화
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="w-[100px]">
|
||||
<SelectValue placeholder="Method" />
|
||||
</SelectTrigger>
|
||||
|
||||
Reference in New Issue
Block a user