small changes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,6 +12,7 @@ dist
|
|||||||
dist-ssr
|
dist-ssr
|
||||||
*.local
|
*.local
|
||||||
.env
|
.env
|
||||||
|
.env.*
|
||||||
.env.local
|
.env.local
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|||||||
Binary file not shown.
@@ -24,10 +24,17 @@ app = FastAPI(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# CORS middleware (MUST be before routes)
|
# CORS middleware (MUST be before routes)
|
||||||
|
cors_origins = [settings.frontend_url]
|
||||||
|
if settings.environment == "development":
|
||||||
|
cors_origins.extend([
|
||||||
|
"http://localhost:8000",
|
||||||
|
"http://127.0.0.1:8000",
|
||||||
|
"http://localhost:5173",
|
||||||
|
])
|
||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["http://localhost:8000",
|
allow_origins=cors_origins,
|
||||||
"http://127.0.0.1:8000", "http://localhost:5173"],
|
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
|
allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
|
|||||||
@@ -5,4 +5,3 @@ pydantic==2.5.0
|
|||||||
python-dotenv==1.0.0
|
python-dotenv==1.0.0
|
||||||
pydantic-settings==2.1.0
|
pydantic-settings==2.1.0
|
||||||
python-multipart==0.0.6
|
python-multipart==0.0.6
|
||||||
cors==1.0.1
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Handles all communication with the backend API
|
* Handles all communication with the backend API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const API_BASE_URL = 'http://localhost:8001'
|
const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:8001'
|
||||||
|
|
||||||
type ApiOptions = {
|
type ApiOptions = {
|
||||||
method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
|
||||||
|
|||||||
@@ -180,12 +180,12 @@ export default function HistoryPage() {
|
|||||||
<h1>History</h1>
|
<h1>History</h1>
|
||||||
<p className="history-subtitle">Your past reflections</p>
|
<p className="history-subtitle">Your past reflections</p>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" className="history-search-btn" title="Search entries">
|
{/* <button type="button" className="history-search-btn" title="Search entries">
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||||
<circle cx="11" cy="11" r="8"></circle>
|
<circle cx="11" cy="11" r="8"></circle>
|
||||||
<path d="m21 21-4.35-4.35"></path>
|
<path d="m21 21-4.35-4.35"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button> */}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="history-container">
|
<main className="history-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user