Browse Source

CLI channels: print metadata in deserialized format

iorveth 4 years ago
parent
commit
2c0ee3c1c4

+ 7 - 1
cli/src/commands/content/createChannel.ts

@@ -39,6 +39,9 @@ export default class CreateChannelCommand extends ContentDirectoryCommandBase {
 
     if (input) {
       let channelCreationParametersInput = await getInputJson<ChannelCreationParametersInput>(input)
+
+      this.jsonPrettyPrint(JSON.stringify(channelCreationParametersInput))
+
       let channelMetadata = new ChannelMetadata()
       channelMetadata.setTitle(channelCreationParametersInput.meta.title!)
       channelMetadata.setDescription(channelCreationParametersInput.meta.description!)
@@ -58,7 +61,10 @@ export default class CreateChannelCommand extends ContentDirectoryCommandBase {
         reward_account: channelCreationParametersInput.reward_account,
       }
 
-      this.jsonPrettyPrint(JSON.stringify(channelCreationParameters))
+      this.jsonPrettyPrint(JSON.stringify(channelCreationParametersInput))
+
+      this.log('Meta: ' + meta)
+
       const confirmed = await this.simplePrompt({ type: 'confirm', message: 'Do you confirm the provided input?' })
 
       if (confirmed)  {

+ 5 - 0
cli/src/commands/content/updateChannel.ts

@@ -50,6 +50,7 @@ export default class UpdateChannelCommand extends ContentDirectoryCommandBase {
 
     if (input) {
       let channelUpdateParametersInput = await getInputJson<ChannelUpdateParametersInput>(input)
+
       let channelMetadata = new ChannelMetadata()
       channelMetadata.setTitle(channelUpdateParametersInput.new_meta.title!)
       channelMetadata.setDescription(channelUpdateParametersInput.new_meta.description!)
@@ -69,6 +70,10 @@ export default class UpdateChannelCommand extends ContentDirectoryCommandBase {
         reward_account: channelUpdateParametersInput.reward_account,
       }
 
+      this.jsonPrettyPrint(JSON.stringify(channelUpdateParametersInput))
+
+      this.log('Meta: ' + meta)
+
       this.jsonPrettyPrint(JSON.stringify(channelUpdateParameters))
       const confirmed = await this.simplePrompt({ type: 'confirm', message: 'Do you confirm the provided input?' })