EENE Dashboard upload to Gitea

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-17 16:59:34 +09:00
parent cf72281c6d
commit b3f2da203b
138 changed files with 13013 additions and 1929 deletions

View File

@@ -21,6 +21,10 @@ export function fileDownloadUrl(fileId: string): string {
return `${baseURL}/files/${fileId}/download`;
}
export function fileHwpPreviewUrl(fileId: string): string {
return `${baseURL}/files/${fileId}/hwp-preview`;
}
apiClient.interceptors.request.use((config) => {
if (config.data instanceof FormData) {
delete config.headers['Content-Type'];
@@ -34,6 +38,14 @@ apiClient.interceptors.response.use(
);
export function getApiErrorMessage(err: unknown, fallback: string): string {
const ax = err as { response?: { data?: { message?: string }; status?: number }; message?: string };
return ax.response?.data?.message || ax.message || fallback;
const ax = err as {
response?: { data?: { message?: string }; status?: number };
message?: string;
code?: string;
};
if (ax.response?.data?.message) return ax.response.data.message;
if (!ax.response && (ax.code === 'ERR_NETWORK' || ax.message?.includes('Network Error'))) {
return '서버에 연결할 수 없습니다. 서버 PC에서 서버시작.bat 이 실행 중인지 확인해 주세요.';
}
return ax.message || fallback;
}