login endpont

This commit is contained in:
ben
2026-08-03 12:30:33 +02:00
parent 3d1d4bcd5d
commit 42b2177a13
3 changed files with 29 additions and 2 deletions
+9 -1
View File
@@ -5,6 +5,10 @@ from database import fetch_all
from events import create_event
from auth import create_user
class Login(BaseModel):
username: str
password: str
class UserCreate(BaseModel):
username: str
password: str
@@ -89,4 +93,8 @@ def api_create_user(user: UserCreate):
return {
"status": "created",
"user_id": user_id
}
}
@app.post("/login")
def api_login(login : Login):