From 6777a48e25edbf8937835c0201ca63baf558866c Mon Sep 17 00:00:00 2001 From: Minhyung Cho Date: Tue, 3 Dec 2024 23:25:31 +0900 Subject: [PATCH 1/4] =?UTF-8?q?remove=20:=20=EC=9D=B4=EC=A4=91=20=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EC=84=A0=EC=96=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/api/ai.api.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/src/api/ai.api.ts b/client/src/api/ai.api.ts index 0e20280..8d083c2 100644 --- a/client/src/api/ai.api.ts +++ b/client/src/api/ai.api.ts @@ -21,9 +21,5 @@ instanceForAi.interceptors.request.use((config: InternalAxiosRequestConfig) => { }); export function AudioAiConvert(formData: FormData) { - return instanceForAi.post(`/ai/audio`, formData, { - headers: { - "Content-Type": "multipart/form-data", - }, - }); + return instanceForAi.post(`/ai/audio`, formData); } From eba93c16edf4ec66954f8896d4dfe0516b6263e6 Mon Sep 17 00:00:00 2001 From: Minhyung Cho Date: Tue, 3 Dec 2024 23:42:59 +0900 Subject: [PATCH 2/4] =?UTF-8?q?refactor=20:=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=B2=98=EB=A6=AC=20=EB=B0=A9?= =?UTF-8?q?=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MindMapMainSection/ControlSection/TextUpload.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/components/MindMapMainSection/ControlSection/TextUpload.tsx b/client/src/components/MindMapMainSection/ControlSection/TextUpload.tsx index b6878d1..8077d85 100644 --- a/client/src/components/MindMapMainSection/ControlSection/TextUpload.tsx +++ b/client/src/components/MindMapMainSection/ControlSection/TextUpload.tsx @@ -9,8 +9,6 @@ import { useConnectionStore } from "@/store/useConnectionStore"; export default function TextUpload() { const { content, updateContent, availabilityInform, handleMouseEnter, handleMouseLeave, errorMsg, updateErrorMsg } = useUpload(); - const role = useConnectionStore((state) => state.currentRole); - const ownerAvailability = role === "owner"; const handleSocketEvent = useConnectionStore((state) => state.handleSocketEvent); function textUploadValidation() { @@ -22,7 +20,8 @@ export default function TextUpload() { } function handleAiProcessButton() { - if (!textUploadValidation() || !ownerAvailability) return; + if (availabilityInform) return; + if (!textUploadValidation()) return; updateErrorMsg(""); handleSocketEvent({ actionType: "aiRequest", payload: { aiContent: content } }); } From 3ad10eb78798ce5d0ededcb752761bc0c4136037 Mon Sep 17 00:00:00 2001 From: Minhyung Cho Date: Tue, 3 Dec 2024 23:43:11 +0900 Subject: [PATCH 3/4] =?UTF-8?q?remove=20:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MindMapMainSection/ControlSection/UploadBox.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/components/MindMapMainSection/ControlSection/UploadBox.tsx b/client/src/components/MindMapMainSection/ControlSection/UploadBox.tsx index cfc26f6..b40c77d 100644 --- a/client/src/components/MindMapMainSection/ControlSection/UploadBox.tsx +++ b/client/src/components/MindMapMainSection/ControlSection/UploadBox.tsx @@ -53,7 +53,6 @@ export default function UploadBox({ file, setFile }: UploadBoxProps) { setIsDragging(false); }; - //TODO : 머시기 확장자에서 나중에 정확히 확장자 표기하기 return (
Date: Tue, 3 Dec 2024 23:43:43 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix=20:=20=EC=97=85=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=8B=9C=20=ED=8C=8C=EC=9D=BC=20=EC=B4=88=EA=B8=B0=ED=99=94?= =?UTF-8?q?=EA=B0=80=20=EC=95=88=20=EB=90=98=EB=8D=98=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MindMapMainSection/ControlSection/VoiceFileUpload.tsx | 7 ++++--- client/src/store/NodeListProvider.tsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/components/MindMapMainSection/ControlSection/VoiceFileUpload.tsx b/client/src/components/MindMapMainSection/ControlSection/VoiceFileUpload.tsx index 3d6e15a..8497971 100644 --- a/client/src/components/MindMapMainSection/ControlSection/VoiceFileUpload.tsx +++ b/client/src/components/MindMapMainSection/ControlSection/VoiceFileUpload.tsx @@ -19,6 +19,7 @@ export default function VoiceFileUpload() { const { aiCount, updateLoadingStatus } = useNodeListContext(); const handleSocketEvent = useConnectionStore((state) => state.handleSocketEvent); const propagateError = useConnectionStore((state) => state.propagateError); + const [key, setKey] = useState(0); function fileValidation(file) { if (!file) { @@ -33,13 +34,12 @@ export default function VoiceFileUpload() { } async function sendAudioFile() { + if (availabilityInform) return; if (!fileValidation(file)) return; updateErrorMsg(""); handleSocketEvent({ actionType: "audioAiRequest" }); - try { const mindMapId = await getMindMapByConnectionId(connectionId); - console.log(mindMapId); const formData = audioFormData(file, mindMapId, connectionId); await AudioAiConvert(formData); } catch (error) { @@ -47,12 +47,13 @@ export default function VoiceFileUpload() { } finally { updateLoadingStatus({ type: "aiPending", status: false }); setFile(null); + setKey((prev) => prev + 1); } } return (
- +

AI 변환 남은 횟수 : {aiCount}번