Epic: #12 — Implement user_activity Table Support
Size: S
Depends on: #13
Description
Add user activity tracking when comments are posted.
Files to modify
app/services/comment_service.py — call record_user_activity() after the two insert_one calls, pass comment_id (the uuid1()) as activity_id
tests/services/test_comment_service.py — verify record_user_activity called with correct args
Key design
activity_type="comment", activity_id=comment_id (links back to the comment)
- Wrap in try/except — never fail the comment operation
Acceptance Criteria
Epic: #12 — Implement
user_activityTable SupportSize: S
Depends on: #13
Description
Add user activity tracking when comments are posted.
Files to modify
app/services/comment_service.py— callrecord_user_activity()after the twoinsert_onecalls, passcomment_id(theuuid1()) asactivity_idtests/services/test_comment_service.py— verifyrecord_user_activitycalled with correct argsKey design
activity_type="comment",activity_id=comment_id(links back to the comment)Acceptance Criteria
add_comment_to_video()callsrecord_user_activitywithactivity_type="comment"and comment's uuid1