Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface UpdateFieldInput {
}

// Base URL for API endpoints
const API_URL = 'http://localhost:8000'
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000'

// Centralized error handling for all API requests
// Extracts error messages and provides consistent error format
Expand Down
2 changes: 1 addition & 1 deletion src/api/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface ApiResponse<T> {
data: T
}

const API_URL = 'http://localhost:8000'
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000'

async function handleResponse<T>(response: Response): Promise<T> {
if (!response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/auth-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createAuthClient } from 'better-auth/react'

export const authClient = createAuthClient({
baseURL: 'http://localhost:8000', // the base url of your auth server
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:8000', // the base url of your auth server
})