Fix: Login-Email als str — EmailStr lehnt .local-Domains ab (422 in CI).
All checks were successful
Deploy Development / deploy (push) Successful in 35s
Test Suite / pytest-backend (push) Successful in 9s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Lars 2026-07-04 20:14:34 +02:00
parent 564008be13
commit 25d3976226
2 changed files with 4 additions and 3 deletions

View File

@ -4,13 +4,14 @@ from __future__ import annotations
from auth import login, logout, require_auth
from fastapi import APIRouter, Depends, Response
from pydantic import BaseModel, EmailStr, Field
from pydantic import BaseModel, Field
router = APIRouter(prefix="/api/auth", tags=["auth"])
class LoginRequest(BaseModel):
email: EmailStr
# str statt EmailStr: Self-Hosted/Dev nutzt oft .local-Domains (admin@kairo.local)
email: str = Field(min_length=3, max_length=255)
password: str = Field(min_length=8, max_length=256)

View File

@ -32,7 +32,7 @@ def create_user(
display_name: str = "Test User",
portal_role: str = "user",
) -> dict:
email = email or f"user-{uuid.uuid4().hex[:8]}@test.local"
email = email or f"user-{uuid.uuid4().hex[:8]}@example.com"
conn = get_connection()
try:
with conn.cursor() as cur: