Fix BOM API endpoints: Add trailing slash to /jobs/ endpoints
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
- Fixed fetchJobs() and createJob() to use /jobs/ instead of /jobs - Resolves 307 Temporary Redirect issue from FastAPI - BOM feature now works properly without connection errors
This commit is contained in:
@@ -3,7 +3,7 @@ import axios from 'axios';
|
||||
// 환경변수에서 API URL을 읽음 (Vite 기준)
|
||||
// 프로덕션에서는 nginx 프록시를 통해 /api 경로 사용
|
||||
const API_BASE_URL = import.meta.env.VITE_API_URL ||
|
||||
(import.meta.env.DEV ? 'http://localhost:8000' : '/api');
|
||||
(import.meta.env.DEV ? 'http://localhost:18000' : '/api');
|
||||
|
||||
console.log('API Base URL:', API_BASE_URL);
|
||||
console.log('Environment:', import.meta.env.MODE);
|
||||
@@ -87,12 +87,12 @@ export function deleteFile(fileId) {
|
||||
|
||||
// 예시: Job 목록 조회
|
||||
export function fetchJobs(params) {
|
||||
return api.get('/jobs', { params });
|
||||
return api.get('/jobs/', { params });
|
||||
}
|
||||
|
||||
// 예시: Job 생성
|
||||
export function createJob(data) {
|
||||
return api.post('/jobs', data);
|
||||
return api.post('/jobs/', data);
|
||||
}
|
||||
|
||||
// 리비전 비교
|
||||
|
||||
Reference in New Issue
Block a user