From c6b21d911990ec1789cfde0c8bc6706190e4e7ac Mon Sep 17 00:00:00 2001 From: Kurbanov Bulat Date: Tue, 28 Dec 2021 16:26:55 +0300 Subject: [PATCH] Fix pagination --- src/core/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/app.py b/src/core/app.py index ecf0318..05c132d 100644 --- a/src/core/app.py +++ b/src/core/app.py @@ -1,5 +1,7 @@ from fastapi import FastAPI +from fastapi_pagination import add_pagination + from core.db import database from app.views import users_router, languages_router @@ -12,6 +14,8 @@ def start_app() -> FastAPI: app.state.database = database + add_pagination(app) + @app.on_event('startup') async def startup() -> None: database_ = app.state.database