comments
backend.api.tracks.comments
Section titled “backend.api.tracks.comments”Track timed comments endpoints.
Functions
Section titled “Functions”get_track_comments source
Section titled “get_track_comments source”get_track_comments(track_id: int, db: Annotated[AsyncSession, Depends(get_db)]) -> CommentsListResponseget all comments for a track, ordered by timestamp.
public endpoint - no auth required.
create_comment source
Section titled “create_comment source”create_comment(track_id: int, body: CommentCreate, db: Annotated[AsyncSession, Depends(get_db)], auth_session: AuthSession = Depends(require_auth)) -> CommentResponsecreate a timed comment on a track.
requires auth. track owner must have allow_comments enabled. the comment is visible immediately; the ATProto record is created in background.
delete_comment source
Section titled “delete_comment source”delete_comment(comment_id: int, db: Annotated[AsyncSession, Depends(get_db)], auth_session: AuthSession = Depends(require_auth)) -> DeletedResponsedelete a comment. only the author can delete their own comments.
the comment is removed immediately; the ATProto record is deleted in background.
update_comment source
Section titled “update_comment source”update_comment(comment_id: int, body: CommentUpdate, db: Annotated[AsyncSession, Depends(get_db)], auth_session: AuthSession = Depends(require_auth)) -> CommentResponseupdate a comment’s text. only the author can edit their own comments.
the comment is updated immediately; the ATProto record is updated in background.
Classes
Section titled “Classes”CommentCreate source
Section titled “CommentCreate source”request body for creating a comment.
CommentUpdate source
Section titled “CommentUpdate source”request body for updating a comment.
CommentResponse source
Section titled “CommentResponse source”response model for a single comment.
CommentsListResponse source
Section titled “CommentsListResponse source”response model for list of comments.