Browse Source

coverPhotoUrl/avatarPhotoUrl - consistent case

Leszek Wiesner 4 years ago
parent
commit
6c823075b6

+ 1 - 1
content-directory-schemas/README.md

@@ -165,7 +165,7 @@ The best way to ilustrate this would be by providing some examples:
       description: 'This is an example channel',
       language: { existing: { code: 'EN' } },
       coverPhotoUrl: '',
-      avatarPhotoURL: '',
+      avatarPhotoUrl: '',
       isPublic: true,
     }
 

+ 1 - 1
content-directory-schemas/examples/createChannel.ts

@@ -23,7 +23,7 @@ async function main() {
     // input/entityBatches/LanguageBatch.json
     language: { existing: { code: 'EN' } },
     coverPhotoUrl: '',
-    avatarPhotoURL: '',
+    avatarPhotoUrl: '',
     isPublic: true,
   }
   // Create the parser with known entity schemas (the ones in content-directory-schemas/inputs)

+ 1 - 1
content-directory-schemas/examples/createChannelWithoutTransaction.ts

@@ -30,7 +30,7 @@ async function main() {
     description: 'This is an example channel',
     language: languageEntityId,
     coverPhotoUrl: '',
-    avatarPhotoURL: '',
+    avatarPhotoUrl: '',
     isPublic: true,
   }
 

+ 1 - 1
content-directory-schemas/inputs/entityBatches/ChannelBatch.json

@@ -6,7 +6,7 @@
       "description": "Joystream Cartoons channel",
       "language": { "existing": { "code": "EN" } },
       "coverPhotoUrl": "https://user-images.githubusercontent.com/4144334/91547902-7e90db00-e91c-11ea-9f5c-45d4921928d5.png",
-      "avatarPhotoURL": "https://user-images.githubusercontent.com/4144334/91546674-ba2aa580-e91a-11ea-96e2-abc7654c0461.png",
+      "avatarPhotoUrl": "https://user-images.githubusercontent.com/4144334/91546674-ba2aa580-e91a-11ea-96e2-abc7654c0461.png",
       "isPublic": true
     }
   ]

+ 1 - 1
content-directory-schemas/inputs/schemas/ChannelSchema.json

@@ -21,7 +21,7 @@
       "property_type": { "Single": { "Text": 256 } }
     },
     {
-      "name": "avatarPhotoURL",
+      "name": "avatarPhotoUrl",
       "description": "Channel's avatar photo.",
       "required": false,
       "property_type": { "Single": { "Text": 256 } }

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

@@ -40,8 +40,8 @@ export const CategoryPropertyNamesWithId: IPropertyIdWithName = {
 export const channelPropertyNamesWithId: IPropertyIdWithName = {
   0: 'title',
   1: 'description',
-  2: 'coverPhotoURL',
-  3: 'avatarPhotoURL',
+  2: 'coverPhotoUrl',
+  3: 'avatarPhotoUrl',
   4: 'isPublic',
   5: 'isCurated',
   6: 'language',

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

@@ -63,8 +63,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

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

@@ -42,8 +42,8 @@ export interface IReference {
 export interface IChannel {
   title: string
   description: string
-  coverPhotoURL: string
-  avatarPhotoURL: string
+  coverPhotoUrl: string
+  avatarPhotoUrl: string
   isPublic: boolean
   isCurated: boolean
   language?: IReference

+ 2 - 2
query-node/schema.graphql

@@ -90,10 +90,10 @@ type Channel @entity {
   description: String!
 
   "Url for Channel's cover (background) photo. Recommended ratio: 16:9."
-  coverPhotoURL: String!
+  coverPhotoUrl: String!
 
   "Channel's avatar photo."
-  avatarPhotoURL: String!
+  avatarPhotoUrl: String!
 
   "Flag signaling whether a channel is public."
   isPublic: Boolean!

+ 2 - 2
tests/network-tests/src/flows/contentDirectory/creatingChannel.ts

@@ -14,7 +14,7 @@ export function createSimpleChannelFixture(api: QueryNodeApi): CreateChannelFixt
     // input/entityBatches/LanguageBatch.json
     language: { existing: { code: 'EN' } },
     coverPhotoUrl: '',
-    avatarPhotoURL: '',
+    avatarPhotoUrl: '',
     isPublic: true,
   }
   return new CreateChannelFixture(api, channelEntity)
@@ -36,7 +36,7 @@ export default async function channelCreation(api: QueryNodeApi) {
   assert(queriedChannel.description === createChannelHappyCaseFixture.channelEntity.description, 'Should be equal')
   assert(queriedChannel.coverPhotoUrl === createChannelHappyCaseFixture.channelEntity.coverPhotoUrl, 'Should be equal')
   assert(
-    queriedChannel.avatarPhotoUrl === createChannelHappyCaseFixture.channelEntity.avatarPhotoURL,
+    queriedChannel.avatarPhotoUrl === createChannelHappyCaseFixture.channelEntity.avatarPhotoUrl,
     'Should be equal'
   )
   assert(queriedChannel.isPublic === createChannelHappyCaseFixture.channelEntity.isPublic, 'Should be equal')