Browse Source

query-node: name consistency - use camelCase

metmirr 4 years ago
parent
commit
6053375748

+ 3 - 3
query-node/mappings/content-directory/content-dir-consts.ts

@@ -40,8 +40,8 @@ export const categoryPropertyNamesWithId: IPropertyWithId = {
 export const channelPropertyNamesWithId: IPropertyWithId = {
   0: { name: 'handle', type: 'string', required: true },
   1: { name: 'description', type: 'string', required: false },
-  2: { name: 'coverPhotoURL', type: 'string', required: false },
-  3: { name: 'avatarPhotoURL', type: 'string', required: false },
+  2: { name: 'coverPhotoUrl', type: 'string', required: false },
+  3: { name: 'avatarPhotoUrl', type: 'string', required: false },
   4: { name: 'isPublic', type: 'boolean', required: true },
   5: { name: 'isCurated', type: 'boolean', required: false },
   6: { name: 'language', type: 'number', required: false },
@@ -103,7 +103,7 @@ export const videoPropertyNamesWithId: IPropertyWithId = {
   3: { name: 'description', type: 'string', required: false },
   4: { name: 'duration', type: 'number', required: true },
   5: { name: 'skippableIntroDuration', type: 'number', required: false },
-  6: { name: 'thumbnailURL', type: 'string', required: true },
+  6: { name: 'thumbnailUrl', type: 'string', required: true },
   7: { name: 'language', type: 'number', required: false },
   // referenced entity's id
   8: { name: 'media', type: 'number', required: true },

+ 3 - 3
query-node/mappings/content-directory/entity/create.ts

@@ -69,8 +69,8 @@ async function createChannel(
   channel.description = p.description
   channel.isCurated = p.isCurated || false
   channel.isPublic = p.isPublic
-  channel.coverPhotoUrl = p.coverPhotoURL
-  channel.avatarPhotoUrl = p.avatarPhotoURL
+  channel.coverPhotoUrl = p.coverPhotoUrl
+  channel.avatarPhotoUrl = p.avatarPhotoUrl
 
   channel.happenedIn = await createBlockOrGetFromDatabase(db, block)
   const { language } = p
@@ -243,7 +243,7 @@ async function createVideo(
   video.isPublic = p.isPublic
   video.publishedBeforeJoystream = p.publishedBeforeJoystream
   video.skippableIntroDuration = p.skippableIntroDuration
-  video.thumbnailUrl = p.thumbnailURL
+  video.thumbnailUrl = p.thumbnailUrl
   video.version = block
 
   const { language, license, category, channel, media } = p

+ 3 - 3
query-node/mappings/types.ts

@@ -42,8 +42,8 @@ export interface IReference {
 export interface IChannel {
   handle: string
   description: string
-  coverPhotoURL: string
-  avatarPhotoURL: string
+  coverPhotoUrl: string
+  avatarPhotoUrl: string
   isPublic: boolean
   isCurated: boolean
   language?: IReference
@@ -100,7 +100,7 @@ export interface IVideo {
   description: string
   duration: number
   skippableIntroDuration?: number
-  thumbnailURL: string
+  thumbnailUrl: string
   language?: IReference
   // referenced entity's id
   media?: IReference