fix : API_URL -> NEXT_PUBLIC_API_URL 일괄 변경
This commit is contained in:
@@ -104,7 +104,7 @@ export async function checkIn(
|
||||
data: CheckInRequest
|
||||
): Promise<{ success: boolean; data?: AttendanceRecord; error?: string; __authError?: boolean }> {
|
||||
try {
|
||||
const { response, error } = await serverFetch(`${process.env.API_URL}/v1/attendances/check-in`, {
|
||||
const { response, error } = await serverFetch(`${process.env.NEXT_PUBLIC_API_URL}/v1/attendances/check-in`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
user_id: data.userId,
|
||||
@@ -158,7 +158,7 @@ export async function checkOut(
|
||||
): Promise<{ success: boolean; data?: AttendanceRecord; error?: string }> {
|
||||
try {
|
||||
const headers = await getApiHeaders();
|
||||
const response = await fetch(`${process.env.API_URL}/v1/attendances/check-out`, {
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/v1/attendances/check-out`, {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: JSON.stringify({
|
||||
@@ -218,7 +218,7 @@ export async function getTodayAttendance(): Promise<{
|
||||
const today = new Date().toISOString().split('T')[0];
|
||||
|
||||
const { response, error } = await serverFetch(
|
||||
`${process.env.API_URL}/v1/attendances?date=${today}&per_page=1`,
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/v1/attendances?date=${today}&per_page=1`,
|
||||
{
|
||||
method: 'GET',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user