Browse Source

CLI categories: add examples

iorveth 4 years ago
parent
commit
d68099fdd5

+ 5 - 0
cli/examples/content/CreateCategory.json

@@ -0,0 +1,5 @@
+{
+  "meta": {
+    "name": "Nature",
+  }
+}

+ 5 - 0
cli/examples/content/UpdateCategory.json

@@ -0,0 +1,5 @@
+{
+  "meta": {
+    "name": "Science",
+  }
+}

+ 2 - 2
cli/src/Types.ts

@@ -263,7 +263,7 @@ export type ChannelCategoryUpdateParametersInput = {
 }
 
 export type ChannelCategoryUpdateParameters = {
-  meta: Bytes
+  new_meta: Bytes
 }
 
 export type VideoCategoryCreationParametersInput = {
@@ -279,5 +279,5 @@ export type VideoCategoryUpdateParametersInput = {
 }
 
 export type VideoCategoryUpdateParameters = {
-  meta: Bytes
+  new_meta: Bytes
 }

+ 1 - 1
cli/src/commands/content/updateChannelCategory.ts

@@ -30,7 +30,7 @@ export default class CreateChannelCategoryCommand extends ContentDirectoryComman
       const meta = channelCategoryMetadataFromInput(api, channelCategoryUpdateParametersInput)
 
       const channelCategoryUpdateParameters: ChannelCategoryUpdateParameters = {
-        meta,
+        new_meta: meta,
       }
 
       this.jsonPrettyPrint(JSON.stringify(channelCategoryUpdateParametersInput))

+ 1 - 1
cli/src/commands/content/updateVideoCategory.ts

@@ -30,7 +30,7 @@ export default class UpdateVideoCategoryCommand extends ContentDirectoryCommandB
       const meta = videoCategoryMetadataFromInput(api, videoCategoryUpdateParametersInput)
 
       const videoCategoryUpdateParameters: VideoCategoryUpdateParameters = {
-        meta,
+        new_meta: meta,
       }
 
       this.jsonPrettyPrint(JSON.stringify(videoCategoryUpdateParameters))