LapStore commited on
Commit ·
f5ec736
1
Parent(s): c87f0a6
make better error handling
Browse files
app.py
CHANGED
|
@@ -50,8 +50,8 @@ def main():
|
|
| 50 |
return "Hello From Background remover !"
|
| 51 |
|
| 52 |
@app.post("/items")
|
| 53 |
-
|
| 54 |
-
async def read_items( type_of_filters: str = Form(...)):
|
| 55 |
return {"items": str(type_of_filters)}
|
| 56 |
|
| 57 |
|
|
|
|
| 50 |
return "Hello From Background remover !"
|
| 51 |
|
| 52 |
@app.post("/items")
|
| 53 |
+
@limiter.limit("3/hour") # must have parameter request
|
| 54 |
+
async def read_items(request: Request, type_of_filters: str = Form(...)):
|
| 55 |
return {"items": str(type_of_filters)}
|
| 56 |
|
| 57 |
|