Skip to content

Commit f460948

Browse files
committed
Fix video url
1 parent ee4ddad commit f460948

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

api/swagger/swagger-v1.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10769,6 +10769,11 @@ components:
1076910769
items:
1077010770
type: integer
1077110771
example: 67890
10772+
videoUrl:
10773+
type: string
10774+
nullable: true
10775+
maxLength: 2048
10776+
description: Optional URL for a video attachment (stored on the comment record)
1077210777
dashboard_wallet_users_response:
1077310778
type: object
1077410779
properties:
@@ -14938,6 +14943,10 @@ components:
1493814943
type: boolean
1493914944
is_members_only:
1494014945
type: boolean
14946+
video_url:
14947+
type: string
14948+
nullable: true
14949+
description: Optional URL for a video attachment on this comment
1494114950
is_muted:
1494214951
type: boolean
1494314952
created_at:
@@ -16241,6 +16250,10 @@ components:
1624116250
type: string
1624216251
updated_at:
1624316252
type: string
16253+
video_url:
16254+
type: string
16255+
nullable: true
16256+
description: Optional URL for a video attachment on this reply
1624416257
parent_comment_id:
1624516258
type: integer
1624616259
user_playlist_library:

api/v1_comments.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type CreateCommentRequest struct {
3030
ParentId *int `json:"parentId,omitempty" validate:"omitempty,min=1"`
3131
TrackTimestampS *int `json:"trackTimestampS,omitempty" validate:"omitempty,min=0"`
3232
Mentions []int `json:"mentions,omitempty" validate:"omitempty,dive,min=1"`
33+
VideoUrl string `json:"videoUrl,omitempty" validate:"omitempty,max=2048"`
3334
}
3435

3536
type UpdateCommentRequest struct {
@@ -175,6 +176,9 @@ func (app *ApiServer) postV1Comment(c *fiber.Ctx) error {
175176
}
176177
metadataMap["mentions"] = mentions
177178
}
179+
if req.VideoUrl != "" {
180+
metadataMap["video_url"] = req.VideoUrl
181+
}
178182

179183
metadataObj := map[string]interface{}{
180184
"cid": "",

0 commit comments

Comments
 (0)