Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions api/swagger/swagger-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10769,6 +10769,11 @@ components:
items:
type: integer
example: 67890
videoUrl:
type: string
nullable: true
maxLength: 2048
description: Optional URL for a video attachment (stored on the comment record)
dashboard_wallet_users_response:
type: object
properties:
Expand Down Expand Up @@ -14938,6 +14943,10 @@ components:
type: boolean
is_members_only:
type: boolean
video_url:
type: string
nullable: true
description: Optional URL for a video attachment on this comment
is_muted:
type: boolean
created_at:
Expand Down Expand Up @@ -16241,6 +16250,10 @@ components:
type: string
updated_at:
type: string
video_url:
type: string
nullable: true
description: Optional URL for a video attachment on this reply
parent_comment_id:
type: integer
user_playlist_library:
Expand Down
4 changes: 4 additions & 0 deletions api/v1_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type CreateCommentRequest struct {
ParentId *int `json:"parentId,omitempty" validate:"omitempty,min=1"`
TrackTimestampS *int `json:"trackTimestampS,omitempty" validate:"omitempty,min=0"`
Mentions []int `json:"mentions,omitempty" validate:"omitempty,dive,min=1"`
VideoUrl string `json:"videoUrl,omitempty" validate:"omitempty,max=2048"`
}

type UpdateCommentRequest struct {
Expand Down Expand Up @@ -175,6 +176,9 @@ func (app *ApiServer) postV1Comment(c *fiber.Ctx) error {
}
metadataMap["mentions"] = mentions
}
if req.VideoUrl != "" {
metadataMap["video_url"] = req.VideoUrl
}

metadataObj := map[string]interface{}{
"cid": "",
Expand Down
Loading