17 lines
476 B
Python
17 lines
476 B
Python
from fastapi import APIRouter, FastAPI
|
|
from infrastructure.adapters.contracts.user import User
|
|
from infrastructure.adapters.contracts.product import Producto
|
|
from core.domain.user import User
|
|
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/users/", response_model = User)
|
|
async def read_users():
|
|
|
|
return [{"username": "Rick"}, {"username": "Morty"}]
|
|
|
|
@router.get("/users/", response_model = Producto)
|
|
async def read_users():
|
|
return [{"username": "Rick"}, {"username": "Morty"}] |