removed help serving

This commit is contained in:
Saifeddine ALOUI 2024-10-17 13:25:30 +02:00
parent 9fec7a86ec
commit b156494894
2 changed files with 2 additions and 24 deletions

View File

@ -209,29 +209,6 @@ async def serve_data(path: str):
@router.get("/help/{path:path}")
async def serve_help(path: str):
"""
Serve image file.
Args:
filename (str): The name of the data file to serve.
Returns:
FileResponse: The file response containing the requested data file.
"""
path = sanitize_path_from_endpoint(path)
root_dir = Path(os.getcwd())
file_path = root_dir/'help/' / path
if not Path(file_path).exists():
raise HTTPException(status_code=404, detail="File not found")
return FileResponse(str(file_path))
@router.get("/uploads/{path:path}") @router.get("/uploads/{path:path}")
async def serve_uploads(path: str): async def serve_uploads(path: str):
""" """

View File

@ -277,6 +277,7 @@ def show_custom_dialog(title, text, options):
except Exception as ex: except Exception as ex:
ASCIIColors.error(ex) ASCIIColors.error(ex)
return show_console_custom_dialog(title, text, options) return show_console_custom_dialog(title, text, options)
def show_yes_no_dialog(title, text): def show_yes_no_dialog(title, text):
try: try:
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
@ -293,7 +294,7 @@ def show_yes_no_dialog(title, text):
def show_windows_dialog(title, text): def show_windows_dialog(title, text):
from ctypes import windll from ctypes import windll
result = windll.user32.MessageBoxW(0, text, title, 4) result = windll.user32.MessageBoxW(0, text, title, 4 | 0x40000)
return result == 6 # 6 means "Yes" return result == 6 # 6 means "Yes"
def show_macos_dialog(title, text): def show_macos_dialog(title, text):