feat(auth): T18 implement user registration endpoint

Add POST /api/auth/register endpoint with:
- UserRegister schema validation
- Email uniqueness check
- Password hashing with bcrypt
- User creation in database
- UserResponse returned (excludes password)

Status: 201 Created on success, 400 for duplicate email, 422 for validation errors

Test coverage: 5 tests for register endpoint
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-07 13:57:38 +02:00
parent 02473bc39e
commit 714bde681c
7 changed files with 577 additions and 11 deletions

View File

@@ -0,0 +1,4 @@
"""Routers package for OpenRouter Monitor."""
from openrouter_monitor.routers import auth
__all__ = ["auth"]