fix : API_URL -> NEXT_PUBLIC_API_URL 일괄 변경
This commit is contained in:
@@ -55,7 +55,7 @@ interface CardResponse {
|
||||
}
|
||||
|
||||
// API URL (without double /api)
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_API_URL || process.env.API_URL}/api`;
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_API_URL}/api`;
|
||||
|
||||
// 상태 매핑: API → Frontend
|
||||
function mapApiStatusToFrontend(apiStatus: 'active' | 'inactive'): CardStatus {
|
||||
|
||||
@@ -371,7 +371,7 @@ export async function getPositions(type?: 'rank' | 'title'): Promise<PositionIte
|
||||
searchParams.set('type', type);
|
||||
}
|
||||
|
||||
const url = `${process.env.API_URL}/api/v1/positions?${searchParams.toString()}`;
|
||||
const url = `${process.env.NEXT_PUBLIC_API_URL}/api/v1/positions?${searchParams.toString()}`;
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: 'GET',
|
||||
@@ -417,7 +417,7 @@ export async function getDepartments(): Promise<DepartmentItem[]> {
|
||||
const headers = await getApiHeaders();
|
||||
|
||||
const response = await fetch(
|
||||
`${process.env.API_URL}/api/v1/departments`,
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/api/v1/departments`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers,
|
||||
|
||||
@@ -22,7 +22,7 @@ import type {
|
||||
// 프로필 이미지 URL 변환
|
||||
// ============================================
|
||||
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || process.env.API_URL || '';
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL || '';
|
||||
|
||||
/**
|
||||
* 프로필 이미지 경로를 전체 URL로 변환
|
||||
|
||||
@@ -86,7 +86,7 @@ interface BulkUpdateResponse {
|
||||
}
|
||||
|
||||
// API URL
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_API_URL || process.env.API_URL}/api`;
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_API_URL}/api`;
|
||||
|
||||
// API → Frontend 변환 (목록용)
|
||||
function transformApiToFrontend(apiData: SalaryApiData): SalaryRecord {
|
||||
|
||||
@@ -172,7 +172,7 @@ interface PaginatedResponse<T> {
|
||||
}
|
||||
|
||||
// API URL
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_API_URL || process.env.API_URL}/api`;
|
||||
const API_URL = `${process.env.NEXT_PUBLIC_API_URL}/api`;
|
||||
|
||||
/**
|
||||
* API 응답에서 프론트엔드 형식으로 변환
|
||||
|
||||
Reference in New Issue
Block a user