Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,9 +49,13 @@ async def read_entry_info(username: str = Depends(authenticate)):
|
|
| 49 |
else:
|
| 50 |
return f"{file_path}が見つかりません。"
|
| 51 |
|
| 52 |
-
#
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
file_path = 'guide.html'
|
| 56 |
if os.path.exists(file_path):
|
| 57 |
return FileResponse(file_path)
|
|
|
|
| 49 |
else:
|
| 50 |
return f"{file_path}が見つかりません。"
|
| 51 |
|
| 52 |
+
# ------------------------------------------------------------------
|
| 53 |
+
# 【修正箇所】
|
| 54 |
+
# 1. URLを "/guide" から "/guide.html" に変更(HTML側のリンクと合わせるため)
|
| 55 |
+
# 2. 関数名を "read_entry_info" から "read_guide" に変更(重複エラー回避)
|
| 56 |
+
# ------------------------------------------------------------------
|
| 57 |
+
@app.get("/guide.html")
|
| 58 |
+
async def read_guide(username: str = Depends(authenticate)):
|
| 59 |
file_path = 'guide.html'
|
| 60 |
if os.path.exists(file_path):
|
| 61 |
return FileResponse(file_path)
|