From ec3858ac6c88f739499e0379d16e7b5095594469 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 26 Mar 2023 10:14:35 +0200 Subject: [PATCH] Fix text return for curl when deleting file --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 846df0d..4531caa 100644 --- a/main.py +++ b/main.py @@ -104,7 +104,7 @@ async def delete(request: Request, file: str, user_agent: Annotated[Union[str, N if exists(file_path): remove(file_path) if re.search("^curl/.*", str(user_agent)): - return PlainTextResponse(f"file {file} doesn't exist on the server\n") + return PlainTextResponse(f"file {file} deleted from the server\n") else: return RedirectResponse(request.url_for('files')) if re.search("^curl/.*", str(user_agent)):