Spaces:
Sleeping
Sleeping
Claude Sonnet 4.6
Major feature update: Google Meet recording, cumulative mirror feed, UX overhaul
5748a9d Download frontend/src/lib/api.js from Harsh200415/Mirror-Backend: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/spaces/Harsh200415/Mirror-Backend/resolve/main/frontend/src/lib/api.js
- Command line
-
hf download hf://spaces/Harsh200415/Mirror-Backend/frontend/src/lib/api.js
-
curl -L -o api.js https://huggingface.co/spaces/Harsh200415/Mirror-Backend/resolve/main/frontend/src/lib/api.js
500 Bytes
| import axios from "axios" | |
| import { supabase } from "./supabase" | |
| const BASE_URL = import.meta.env.VITE_API_URL | |
| if (!BASE_URL) throw new Error("VITE_API_URL is not set — check your .env file") | |
| const api = axios.create({ baseURL: BASE_URL }) | |
| api.interceptors.request.use(async (config) => { | |
| const { data: { session } } = await supabase.auth.getSession() | |
| if (session?.access_token) { | |
| config.headers.Authorization = `Bearer ${session.access_token}` | |
| } | |
| return config | |
| }) | |
| export default api | |