diff --git a/backend/app/api/auth.py b/backend/app/api/auth.py index 16387dd..3e655d9 100644 --- a/backend/app/api/auth.py +++ b/backend/app/api/auth.py @@ -16,6 +16,7 @@ logger = logging.getLogger("uvicorn.error") @router.post("/login", response_model=TokenResponse) async def login(credentials: LoginRequest, db: AsyncSession = Depends(get_db)): email_clean = credentials.email.strip().lower() + result = await db.execute(select(User).where(User.email == email_clean)) user = result.scalar_one_or_none() diff --git a/backend/app/core/security.py b/backend/app/core/security.py index cee43ed..4a33c02 100644 --- a/backend/app/core/security.py +++ b/backend/app/core/security.py @@ -15,7 +15,10 @@ def verify_password(plain_password: str, hashed_password: str) -> bool: """Verifies a plain password against a bcrypt hash.""" try: return bcrypt.checkpw(plain_password.encode("utf-8"), hashed_password.encode("utf-8")) - except Exception: + except Exception as e: + print(f">> verify_password Exception: {e}") + import traceback + traceback.print_exc() return False def create_access_token(subject: Any, role: str = "ADMIN", expires_delta: Optional[timedelta] = None) -> str: diff --git a/frontend/src/pages/JobsView.tsx b/frontend/src/pages/JobsView.tsx index 30596bd..b414bee 100644 --- a/frontend/src/pages/JobsView.tsx +++ b/frontend/src/pages/JobsView.tsx @@ -10,7 +10,7 @@ import { X, Edit2 } from 'lucide-react'; -import { BackupJobItem, ClientItem, api, SystemSettingsResponse } from '../services/api'; +import { BackupJobItem, ClientItem, api, SystemSettingsResponse, JobRunItem } from '../services/api'; interface JobsViewProps { jobs: BackupJobItem[]; @@ -45,7 +45,6 @@ export const JobsView: React.FC = ({ jobs, clients, onRefresh, se const [selectedJobForRuns, setSelectedJobForRuns] = useState(null); const [runsHistory, setRunsHistory] = useState([]); const [loadingRuns, setLoadingRuns] = useState(false); - const [loading, setLoading] = useState(false); const handleShowRuns = async (job: BackupJobItem) => { setSelectedJobForRuns(job); diff --git a/windows-agent/agent/service.py b/windows-agent/agent/service.py index 4802a3c..4e4f64d 100644 --- a/windows-agent/agent/service.py +++ b/windows-agent/agent/service.py @@ -5,6 +5,7 @@ import threading import logging import shutil import re +import os from datetime import datetime, timezone, timedelta from pathlib import Path from typing import Optional, Callable, Dict, Any, List