mirror of
https://github.com/shadoll/scatcher.git
synced 2025-12-20 03:26:59 +00:00
Add __last endpoint to API
This commit is contained in:
3
app.py
3
app.py
@@ -66,6 +66,7 @@ def check_namespace(namespace):
|
||||
if (
|
||||
namespace == "__history"
|
||||
or namespace == "__last_request"
|
||||
or namespace == "__last"
|
||||
or namespace == "__clear"
|
||||
or namespace == "__help"
|
||||
or namespace == "docs"
|
||||
@@ -139,7 +140,9 @@ def help():
|
||||
|
||||
|
||||
@app.get("/api/__last_request", status_code=status.HTTP_200_OK)
|
||||
@app.get("/api/__last}", status_code=status.HTTP_200_OK)
|
||||
@app.get("/api/__last_request/{namespace}", status_code=status.HTTP_200_OK)
|
||||
@app.get("/api/__last/{namespace}", status_code=status.HTTP_200_OK)
|
||||
async def last_requests(
|
||||
response: Response,
|
||||
namespace: str = "requests",
|
||||
|
||||
Reference in New Issue
Block a user