Skip to content

Commit 0bdea6d

Browse files
authored
Merge pull request #46 from rande/fix_access_role_async_action
feat(access): add missing access information for youtube thumbnail image
2 parents a11e46f + bcecbfb commit 0bdea6d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

modules/media/media_youtube.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func (l *YoutubeListener) Handle(notification *pq.Notification, m base.NodeManag
129129
image.Source = node.Uuid
130130
image.CreatedBy = node.CreatedBy
131131
image.UpdatedBy = node.UpdatedBy
132+
image.Access = node.Access
132133

133134
m.Save(image, false)
134135
}

modules/media/media_youtube_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ func Test_YoutubeListener_Found(t *testing.T) {
161161

162162
node.Data.(*Youtube).Status = base.ProcessStatusUpdate
163163
node.Data.(*Youtube).Vid = "MyVideoId"
164+
node.Access = []string{"node:api:rande"}
164165

165166
client := &helper.MockedHttpClient{}
166167
client.
@@ -223,4 +224,5 @@ func Test_YoutubeListener_Found(t *testing.T) {
223224
a.Equal(nodeImage.CreatedBy, node.CreatedBy)
224225
a.Equal(nodeImage.UpdatedBy, node.UpdatedBy)
225226
a.Equal(nodeImage.Source, node.Source)
227+
a.Equal(nodeImage.Access, node.Access)
226228
}

0 commit comments

Comments
 (0)