You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API reads the anon_id cookie to attribute reviews to anonymous visitors.
When the cookie is missing, a new UUID is minted and returned in the response headers with:
HttpOnly flag set.
SameSite=Lax.
max-age of one year.
Side Effects after Successful Review Creation
The review is persisted in reviews with likes defaulting to 0.
Corresponding entry in webtoon_rating_stats is inserted/updated to keep the aggregate review count and average rating in sync (average = (prev_sum + new_rating) / new_count).
Failure Responses
Status
When
Body
404
webtoon_id does not exist in normalized_webtoon.
{"detail": "해당 웹툰을 찾을 수 없습니다."}
409
anon_id already has a review for the specified webtoon_id.
{"detail": "이미 해당 웹툰에 대한 리뷰를 작성했습니다."}
422
Validation fails (missing fields, rating out of range, empty content, etc.).
FastAPI validation payload detailing the offending field.
500
Unexpected server/database errors (transaction rollbacks are logged; a generic message is returned).
{"detail": "Internal Server Error"}
Notes
likes is returned to support future “like review” features but currently always starts at zero.
Additional moderation (profanity filtering, spam detection) can be layered on top of the service without changing the contract.
Review Update API
Endpoint
Method
/webtoons/{webtoon_id}/reviews
PUT
Path Parameters
Name
Type
Description
webtoon_id
string
ID of the webtoon whose review should be updated (e.g., kakao_1000).