260706_2_로그인 인증 검토

This commit is contained in:
2026-07-07 20:40:10 +09:00
parent f8633bb1fe
commit 5da0260be3
29 changed files with 720 additions and 336 deletions
+2 -3
View File
@@ -1,6 +1,6 @@
/* B03 다중 파일 업로드 API 클라이언트 */
import { API_BASE_URL, API_TIMEOUT_MS, AUTH_TOKEN_KEY } from "@config/config_frontend";
import { API_BASE_URL, API_TIMEOUT_MS } from "@config/config_frontend";
export interface UploadedFileResult {
input_file_id: number;
@@ -26,11 +26,10 @@ export async function uploadProjectFiles(
const controller = new AbortController();
const timeoutId = window.setTimeout(() => controller.abort(), API_TIMEOUT_MS);
const token = localStorage.getItem(AUTH_TOKEN_KEY);
try {
const response = await fetch(`${API_BASE_URL}/projects/${projectId}/files`, {
method: "POST",
headers: token ? { Authorization: `Bearer ${token}` } : undefined,
credentials: "include",
body: formData,
signal: controller.signal,
});