Skip to content

Commit

Permalink
Enable avatar post api
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jun 26, 2024
1 parent a93767a commit a79a7c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/api/v1/avatars.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _get_status_code_for_error(error_code: ErrorCode) -> int:
return 500


# @router.post("/api/v1/users/{user_id}/avatar")
@router.post("/api/v1/users/{user_id}/avatar")
async def upload_avatar(user_id: str, file_content: bytes = File(...)):
data = await app.usecases.images.upload_image(
image_type=ImageType.USER_AVATAR,
Expand Down
6 changes: 3 additions & 3 deletions app/usecases/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
# TODO?: I think image/apng may be slipping past here
}

DISALLOWED_MODERATION_LABELS = [
# https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api
# https://docs.aws.amazon.com/rekognition/latest/dg/moderation.html#moderation-api
DISALLOWED_MODERATION_LABELS = {
"Explicit Nudity",
"Explicit Sexual Activity",
"Sex Toys",
Expand All @@ -33,7 +33,7 @@
"Blood & Gore",
"Death and Emaciation",
"Hate Symbols",
]
}


class ImageType(str, Enum):
Expand Down

0 comments on commit a79a7c9

Please sign in to comment.