from fastapi import APIRouter from endpoints.photo_editor_preview import PhotoEditorEndpoint from jwt import access_security, refresh_security router = APIRouter() @router.get("/photo/editor-preview/{photo_id}", summary="Photo editor preview") async def photo_editor_preview( photo_id: int, brightness: float | None = None, contrast: float | None = None, saturation: float | None = None, sharpness: float | None = None, rotate: float | None = None, crop_left: float | None = None, crop_top: float | None = None, crop_width: float | None = None, crop_height: float | None = None, ): return await PhotoEditorEndpoint( access_token=access_security, refresh_token=refresh_security ).show_preview( photo_id=photo_id, logged_user_id=0, saturation=saturation, brightness=brightness, contrast=contrast, sharpness=sharpness, crop_top=crop_top, crop_left=crop_left, crop_height=crop_height, crop_width=crop_width, rotate=rotate, )