[as instl] 기타 파일 삭제시 실제 첨부 파일에 대해서 삭제여부 Y로 변경 처리 로직 추가

This commit is contained in:
2026-05-27 18:42:47 +09:00
parent 153f3b7fa7
commit a87f887635
2 changed files with 87 additions and 38 deletions
+17
View File
@@ -0,0 +1,17 @@
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 });
}