Fixed mime types of photo/video get
This commit is contained in:
@@ -266,10 +266,18 @@ if configGet("media_token_access") is True:
|
||||
return Response(image_file, media_type=mime)
|
||||
|
||||
|
||||
photo_get_responses = {404: PhotoNotFoundError("id").openapi}
|
||||
photo_get_responses = {
|
||||
200: {"content": {"image/*": {}}},
|
||||
404: PhotoNotFoundError("id").openapi,
|
||||
}
|
||||
|
||||
|
||||
@app.get("/photos/{id}", description="Get a photo by id", responses=photo_get_responses)
|
||||
@app.get(
|
||||
"/photos/{id}",
|
||||
description="Get a photo by id",
|
||||
responses=photo_get_responses,
|
||||
response_class=Response,
|
||||
)
|
||||
async def photo_get(
|
||||
id: str,
|
||||
current_user: User = Security(get_current_active_user, scopes=["photos.read"]),
|
||||
|
Reference in New Issue
Block a user