MCPcopy Create free account
hub / github.com/dbunt1tled/python-fast-api / list

Method list

src/app/user/controller/user_controller.py:21–32  ·  view source on GitHub ↗
(self, req: UserListRequest = Depends())

Source from the content-addressed store, hash-verified

19 app.include_router(router=router)
20
21 async def list(self, req: UserListRequest = Depends()) -> JsonApiResponse:
22 users = await self.container.user_service().all(
23 filters=[
24 Filter("email", Oper.EQ, req.email),
25 ],
26 pagination=Pagination(
27 per_page=req.per_page or 10,
28 page=req.page or 1,
29 ),
30 )
31
32 return await self.response(data=users, include=req.include)
33
34 async def view(self, user_id: int, req: Request) -> JsonApiResponse:
35 user = await self.container.user_service().get_by_id(user_id)

Callers

nothing calls this directly

Calls 4

FilterClass · 0.90
PaginationClass · 0.90
allMethod · 0.45
responseMethod · 0.45

Tested by

no test coverage detected