Refaktoring photo endpointu

This commit is contained in:
Michal Kváček
2023-11-02 09:03:35 +01:00
parent 0de73a5ec2
commit 52ddf6502a
7 changed files with 175 additions and 159 deletions
+1 -1
View File
@@ -16,4 +16,4 @@ async def resize_photo(path: str, filename: str, photo_id: int):
async def generate_thumbnail(path: str, filename: str):
editor = PhotoEditor(path, filename)
editor.resize(new_width=300)
editor.write_to_file(quality=85, dest_path=f"{path}/thumbs/")
editor.write_to_file(quality=85, dest_path=f"{path}/thumbs/")