fix: update endpoints

This commit is contained in:
2026-05-12 00:26:21 +03:00
parent b1a763675a
commit 8ea86ccb10
10 changed files with 199 additions and 38 deletions

View File

@@ -1,9 +1,9 @@
from fastapi import APIRouter,Depends
from fastapi.responses import ORJSONResponse
from src.application.commands import CompleteKycCommand,GetKycSessionCommand,PassKycCommand
from src.application.commands import 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
from src.presentation.dependencies.commands import get_kyc_session_command,get_pass_kyc_command
kyc_router = APIRouter(prefix='/kyc', tags=['Kyc'])
@@ -11,29 +11,17 @@ kyc_router = APIRouter(prefix='/kyc', tags=['Kyc'])
@kyc_router.post('/create')
async def create_kyc(
#auth: AuthContext = Depends(require_access_token),
auth: AuthContext = Depends(require_access_token),
command: PassKycCommand = Depends(get_pass_kyc_command),
) -> ORJSONResponse:
#result = await command(user_id=user_id)
result = await command(user_id='01KPKAFN6J1NJBY15DX8JE2QYB')
result = await command(user_id=auth.user_id)
return ORJSONResponse(result.model_dump())
@kyc_router.get('/session')
async def get_kyc_session(
#auth: AuthContext = Depends(require_access_token),
auth: AuthContext = Depends(require_access_token),
command: GetKycSessionCommand = Depends(get_kyc_session_command),
) -> ORJSONResponse:
#result = await command(user_id=user_id)
result = await command(user_id='01KPKAFN6J1NJBY15DX8JE2QYB')
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=user_id)
result = await command(user_id='01KPKAFN6J1NJBY15DX8JE2QYB')
result = await command(user_id=auth.user_id)
return ORJSONResponse(result.model_dump())