[as] feat: 첨부파일 다운로드 기능 추가

This commit is contained in:
2026-06-29 13:49:33 +09:00
parent 9837a7af71
commit 9816a9c46a
10 changed files with 125 additions and 43 deletions
+1
View File
@@ -2,6 +2,7 @@ export const ENDPOINT = {
ATTACH_SERVICE: {
TUS_UPLOAD: "/attach-service/api/v1/tus/upload",
ATTACHMENTS: "/attach-service/api/v1/atfl/attachments",
DOWNLOAD: "/attach-service/api/v1/atflcd/download",
},
AS_SERVICE: {
ACNTG_SE: "/as-service/api/v1/acntg-se",
-17
View File
@@ -1,17 +0,0 @@
import { getCookie } from "@/shared/lib";
import { CLAIM_NAME, AUTH_USER_ID } from "@/shared/config/env";
import axios from "axios";
import { PROXY_HOST, ENDPOINT } from "@/shared/config";
/**
* Common helper to delete attachment using cookies for auth headers.
*/
export async function deleteAttachment(atflId: string): Promise<void> {
if (!atflId) return;
const headers: Record<string, string> = {
[CLAIM_NAME]: getCookie(CLAIM_NAME) ?? "",
[AUTH_USER_ID]: getCookie(AUTH_USER_ID) ?? "",
};
const url = `${PROXY_HOST}${ENDPOINT.ATTACH_SERVICE.ATTACHMENTS}/${atflId}`;
await axios.delete(url, { headers });
}