master user anlegen #2

Merged
Lars merged 8 commits from develop into main 2026-07-04 22:35:08 +02:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 25d3976226 - Show all commits

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: