Browse Source

query node - isCensored sign fix

ondratra 3 years ago
parent
commit
fa78fcf9cd

+ 7 - 6
query-node/generated/types/content.ts

@@ -18,6 +18,7 @@ import {
   ContentId,
   CuratorGroupId,
   CuratorId,
+  IsCensored,
   PlaylistCreationParameters,
   PlaylistId,
   PlaylistUpdateParameters,
@@ -359,7 +360,7 @@ export namespace Content {
     public readonly expectedParamTypes = [
       "ContentActor",
       "ChannelId",
-      "bool",
+      "IsCensored",
       "Vec<u8>"
     ];
 
@@ -400,8 +401,8 @@ export namespace Content {
       ]);
     }
 
-    get bool(): bool {
-      return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
+    get isCensored(): IsCensored {
+      return createTypeUnsafe<IsCensored & Codec>(typeRegistry, "IsCensored", [
         this.ctx.params[2].value
       ]);
     }
@@ -1011,7 +1012,7 @@ export namespace Content {
     public readonly expectedParamTypes = [
       "ContentActor",
       "VideoId",
-      "bool",
+      "IsCensored",
       "Vec<u8>"
     ];
 
@@ -1052,8 +1053,8 @@ export namespace Content {
       ]);
     }
 
-    get bool(): bool {
-      return createTypeUnsafe<bool & Codec>(typeRegistry, "bool", [
+    get isCensored(): IsCensored {
+      return createTypeUnsafe<IsCensored & Codec>(typeRegistry, "IsCensored", [
         this.ctx.params[2].value
       ]);
     }

+ 3 - 2
query-node/generated/types/typedefs.json

@@ -84,7 +84,7 @@
         "_enum": [
             "Storage",
             "Content",
-            "Builder",
+            "Operations",
             "Gateway"
         ]
     },
@@ -827,5 +827,6 @@
             "ExistingVideo": "VideoId"
         }
     },
-    "MaxNumber": "u32"
+    "MaxNumber": "u32",
+    "IsCensored": "bool"
 }

+ 1 - 1
query-node/mappings/src/content/channel.ts

@@ -152,7 +152,7 @@ export async function content_ChannelCensorshipStatusUpdated(
   event: SubstrateEvent
 ) {
   // read event data
-  const {channelId, bool: isCensored} = new Content.ChannelCensorshipStatusUpdatedEvent(event).data
+  const {channelId, isCensored} = new Content.ChannelCensorshipStatusUpdatedEvent(event).data
 
   // load event
   const channel = await db.get(Channel, { where: { id: channelId.toString() } as FindConditions<Channel> })

+ 1 - 1
query-node/mappings/src/content/video.ts

@@ -291,7 +291,7 @@ export async function content_VideoCensorshipStatusUpdated(
   event: SubstrateEvent
 ) {
   // read event data
-  const {videoId, bool: isCensored} = new Content.VideoCensorshipStatusUpdatedEvent(event).data
+  const {videoId, isCensored} = new Content.VideoCensorshipStatusUpdatedEvent(event).data
 
   // load video
   const video = await db.get(Video, { where: { id: videoId.toString() } as FindConditions<Video> })