init commit

This commit is contained in:
2026-05-11 12:15:03 +03:00
commit 7dbbd98312
96 changed files with 3750 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
from fastapi import APIRouter,Depends
from fastapi.responses import ORJSONResponse
from src.application.commands import CompleteKycCommand,GetKycSessionCommand,PassKycCommand
from src.application.domain.dto import AuthContext
from src.presentation.decorators.auth import require_access_token
from src.presentation.dependencies.commands import get_complete_kyc_command,get_kyc_session_command,get_pass_kyc_command
kyc_router = APIRouter(prefix='/kyc', tags=['Kyc'])
@kyc_router.post('/create')
async def create_kyc(
auth: AuthContext = Depends(require_access_token),
command: PassKycCommand = Depends(get_pass_kyc_command),
) -> ORJSONResponse:
user_id = auth.user_id
result = await command(user_id=user_id)
return ORJSONResponse(result.model_dump())
@kyc_router.get('/session')
async def get_kyc_session(
auth: AuthContext = Depends(require_access_token),
command: GetKycSessionCommand = Depends(get_kyc_session_command),
) -> ORJSONResponse:
result = await command(user_id=auth.user_id)
return ORJSONResponse(result.model_dump())
@kyc_router.post('/complete')
async def complete_kyc(
auth: AuthContext = Depends(require_access_token),
command: CompleteKycCommand = Depends(get_complete_kyc_command),
) -> ORJSONResponse:
result = await command(user_id=auth.user_id)
return ORJSONResponse(result.model_dump())