Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -289,6 +289,11 @@ def clear_session():
|
|
289 |
return {"message": "Session cleared"}
|
290 |
|
291 |
|
|
|
|
|
|
|
|
|
|
|
292 |
@app.get("/{path_name:path}")
|
293 |
async def catch_all(path_name: str):
|
294 |
return JSONResponse(status_code=404, content={"message": f"Route '{path_name}' not found"})
|
@@ -300,6 +305,10 @@ async def get_logs(logs: str = None):
|
|
300 |
# Implement the logic for fetching container logs
|
301 |
return JSONResponse(status_code=200, content={"message": "Here are your container logs"})
|
302 |
return JSONResponse(status_code=404, content={"message": "Log type not found"})
|
|
|
|
|
|
|
|
|
303 |
|
304 |
|
305 |
@app.get("/test-match")
|
|
|
289 |
return {"message": "Session cleared"}
|
290 |
|
291 |
|
292 |
+
@app.get("/")
|
293 |
+
async def read_root():
|
294 |
+
return {"message": "Welcome to the API!"}
|
295 |
+
|
296 |
+
|
297 |
@app.get("/{path_name:path}")
|
298 |
async def catch_all(path_name: str):
|
299 |
return JSONResponse(status_code=404, content={"message": f"Route '{path_name}' not found"})
|
|
|
305 |
# Implement the logic for fetching container logs
|
306 |
return JSONResponse(status_code=200, content={"message": "Here are your container logs"})
|
307 |
return JSONResponse(status_code=404, content={"message": "Log type not found"})
|
308 |
+
|
309 |
+
@app.get("/robots.txt")
|
310 |
+
async def robots_txt():
|
311 |
+
return "User-agent: *\nDisallow: /"
|
312 |
|
313 |
|
314 |
@app.get("/test-match")
|