Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to docs limiter must be below the route annotation in order to work #39

Closed
transfluxus opened this issue Feb 23, 2021 · 0 comments
Closed

Comments

@transfluxus
Copy link

This works

@router.get("/test")
@limiter.limit("2/minute")
async def test(
        request: Request
):
    return "hi"

but this doesnt

@limiter.limit("2/minute")
@router.get("/test")
async def test(
        request: Request
):
    return "hi"

That would be useful for beginners to know (if they havent used any ratelimiter module before)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants