소스 검색

setFeaturedVideos input format

Leszek Wiesner 3 년 전
부모
커밋
f2fd8ca968
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      cli/src/commands/content/setFeaturedVideos.ts

+ 6 - 3
cli/src/commands/content/setFeaturedVideos.ts

@@ -1,13 +1,13 @@
 import ContentDirectoryCommandBase from '../../base/ContentDirectoryCommandBase'
 
 export default class SetFeaturedVideosCommand extends ContentDirectoryCommandBase {
-  static description = 'Set featured videos.'
+  static description = 'Set featured videos. Requires lead access.'
 
   static args = [
     {
       name: 'featuredVideoIds',
       required: true,
-      description: 'IDs of the featured videos',
+      description: 'Comma-separated video IDs (ie. 1,2,3)',
     },
   ]
 
@@ -19,6 +19,9 @@ export default class SetFeaturedVideosCommand extends ContentDirectoryCommandBas
 
     const actor = await this.getActor('Lead')
 
-    await this.sendAndFollowNamedTx(currentAccount, 'content', 'setFeaturedVideos', [actor, featuredVideoIds])
+    await this.sendAndFollowNamedTx(currentAccount, 'content', 'setFeaturedVideos', [
+      actor,
+      (featuredVideoIds as string).split(','),
+    ])
   }
 }