Update main.py

This commit is contained in:
CronyAkatsuki 2023-12-19 13:10:13 +01:00
parent 7711c4c552
commit 212bf7ca75

View File

@ -142,9 +142,7 @@ If you wan't to delete a file ask the hoster of the instance!!"
remove(file_path)
if re.search("^curl/.*", str(user_agent)):
return PlainTextResponse(f"file {file} deleted from the server\n")
else:
return RedirectResponse(request.url_for("files"))
if re.search("^curl/.*", str(user_agent)):
return PlainTextResponse(f"file {file} doesn't exist on the server\n")
else:
return RedirectResponse(request.url_for("files"))