Skip to content

Commit 88a7ac3

Browse files
committed
fix: streamline limiter assignment in main app
1 parent f7c48c9 commit 88a7ac3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/main.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ async def lifespan(app: FastAPI):
2222
pass
2323

2424

25-
appLimiter = limiter
26-
27-
2825
app = FastAPI(
2926
lifespan=lifespan,
3027
title="pynews-server",
3128
description="PyNews Server",
3229
)
3330

3431

35-
app.state.limiter = appLimiter
32+
app.state.limiter = limiter
3633
app.add_exception_handler(429, _rate_limit_exceeded_handler)
3734

3835
app.include_router(setup_router_v2(), prefix="/api")

0 commit comments

Comments
 (0)