Browse Source

removeVideo - require confirmation

Leszek Wiesner 4 years ago
parent
commit
99b93d3884
1 changed files with 2 additions and 0 deletions
  1. 2 0
      cli/src/commands/media/removeVideo.ts

+ 2 - 0
cli/src/commands/media/removeVideo.ts

@@ -36,6 +36,8 @@ export default class RemoveVideoCommand extends ContentDirectoryCommandBase {
 
     const video = await this.parseToKnownEntityJson<VideoEntity>(videoEntity)
 
+    await this.requireConfirmation(`Are you sure you want to remove the "${video.title}" video?`)
+
     const api = this.getOriginalApi()
     this.log(`Removing the Video entity (ID: ${videoId})...`)
     await this.sendAndFollowTx(account, api.tx.contentDirectory.removeEntity(actor, videoId))