2026.06.04 frontend építés közben

This commit is contained in:
Roo
2026-06-04 07:26:22 +00:00
parent 7adf6cc3e3
commit 59a30ac428
3302 changed files with 24091 additions and 1771 deletions

View File

@@ -0,0 +1,27 @@
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select
from app.db.session import get_db
from app.schemas.user import UserResponse
from app.models.user import User
router = APIRouter()
# Ideiglenes mock user, amíg nincs JWT auth
async def get_mock_current_user_id():
return 2 # Good Guy ID
@router.get("/me", response_model=UserResponse)
async def read_users_me(
db: AsyncSession = Depends(get_db),
user_id: int = Depends(get_mock_current_user_id)
):
"""Visszaadja a bejelentkezett felhasználó profilját (Hírnévvel!)"""
result = await db.execute(select(User).where(User.id == user_id))
user = result.scalars().first()
if not user:
raise HTTPException(status_code=404, detail="User not found")
return user

View File

@@ -0,0 +1 @@
{"version":1,"resource":"vscode-remote://192.168.100.43:8443/home/coder/project/backend/app/api/v1/users.py","entries":[{"id":"IRaR.py","timestamp":1769035906524}]}