Refactor API hooks to remove infinite query support and update API client base URL
- Removed infinite query options and related functions from Trading212, User Registration, and User API files. - Updated API client base URLs in privateClient.ts and publicClient.ts to use environment variable for backend URL. - Refactored Downloader component to directly call API functions for video info retrieval instead of using a hook.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import axios, { type AxiosRequestConfig } from "axios";
|
||||
|
||||
const backendUrl = import.meta.env.VITE_BACKEND_URL || "http://localhost:8000";
|
||||
|
||||
|
||||
// použij tohle pro API vyžadující autentizaci
|
||||
export const privateApi = axios.create({
|
||||
baseURL: "/api/",
|
||||
baseURL: backendUrl,
|
||||
withCredentials: true, // potřebuje HttpOnly cookies
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user