Fix google auth url

This commit is contained in:
dvirlabs 2025-12-31 01:28:25 +02:00
parent 1d320f7284
commit 0c33068398
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import axios from 'axios' import axios from 'axios'
const API_BASE_URL = 'http://localhost:8000' const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000'
const api = axios.create({ const api = axios.create({
baseURL: API_BASE_URL, baseURL: API_BASE_URL,

View File

@ -28,7 +28,8 @@ function GoogleImport({ onImportComplete }) {
const handleGoogleImport = () => { const handleGoogleImport = () => {
setImporting(true) setImporting(true)
// Redirect to backend OAuth endpoint (owner will be extracted from email) // Redirect to backend OAuth endpoint (owner will be extracted from email)
window.location.href = 'http://localhost:8000/auth/google' const apiUrl = import.meta.env.VITE_API_URL || 'http://localhost:8000'
window.location.href = `${apiUrl}/auth/google`
} }
return ( return (