Add Allusers view
parent
b733a6bf9a
commit
f5ecba9c1e
|
@ -1,7 +1,8 @@
|
|||
from fastapi import FastAPI
|
||||
|
||||
from api.presentation.routers import healthcheck_router
|
||||
from api.presentation.routers import healthcheck_router, user_router
|
||||
|
||||
|
||||
def init_routers(app: FastAPI) -> None:
|
||||
app.include_router(user_router)
|
||||
app.include_router(healthcheck_router)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
from .user_response import UserResponse
|
||||
|
||||
__all__ = ("UserResponse",)
|
|
@ -0,0 +1,7 @@
|
|||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class UserResponse:
|
||||
name: str
|
||||
email: str
|
|
@ -1,3 +1,7 @@
|
|||
from .ping import healthcheck_router
|
||||
from .user import user_router
|
||||
|
||||
__all__ = ("healthcheck_router",)
|
||||
__all__ = (
|
||||
"healthcheck_router",
|
||||
"user_router",
|
||||
)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
from api.application.contracts.user import UserResponse
|
||||
|
||||
user_router = APIRouter(prefix="/users", tags=["Users"])
|
||||
|
||||
|
||||
@user_router.get("/")
|
||||
async def get_all_users() -> list[UserResponse]:
|
||||
return []
|
Loading…
Reference in New Issue