chore: remove unused jinja export option (#5631)

This commit is contained in:
Hayden
2025-07-04 19:45:56 -05:00
committed by GitHub
parent 50a986f331
commit da3271f33f
10 changed files with 8 additions and 137 deletions

View File

@@ -32,7 +32,6 @@ class JSONBytes(JSONResponse):
class FormatResponse(BaseModel):
jjson: list[str] = Field(..., alias="json")
zip: list[str]
jinja2: list[str]
class BaseRecipeController(BaseCrudController):

View File

@@ -1,4 +1,5 @@
import shutil
from uuid import uuid4
from fastapi import File, HTTPException, UploadFile, status
from pydantic import UUID4
@@ -24,7 +25,10 @@ class UserImageController(BaseUserController):
"""Updates a User Image"""
with get_temporary_path() as temp_path:
assert_user_change_allowed(id, self.user, self.user)
temp_img = temp_path.joinpath(profile.filename)
# use a generated uuid and ignore the filename so we don't
# need to worry about sanitizing user inputs.
temp_img = temp_path.joinpath(str(uuid4()))
with temp_img.open("wb") as buffer:
shutil.copyfileobj(profile.file, buffer)