mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2025-12-06 14:45:38 +01:00
Fix pagination
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
|
|
||||||
|
from fastapi_pagination import add_pagination
|
||||||
|
|
||||||
from core.db import database
|
from core.db import database
|
||||||
from app.views import users_router, languages_router
|
from app.views import users_router, languages_router
|
||||||
|
|
||||||
@@ -12,6 +14,8 @@ def start_app() -> FastAPI:
|
|||||||
|
|
||||||
app.state.database = database
|
app.state.database = database
|
||||||
|
|
||||||
|
add_pagination(app)
|
||||||
|
|
||||||
@app.on_event('startup')
|
@app.on_event('startup')
|
||||||
async def startup() -> None:
|
async def startup() -> None:
|
||||||
database_ = app.state.database
|
database_ = app.state.database
|
||||||
|
|||||||
Reference in New Issue
Block a user