Skip to content

Commit 08c346d

Browse files
authored
Merge pull request #68 from kleros/fix/multiple-file-type
fix(cms): change-multiple-file-type-to-single
2 parents dc057b7 + d5c6d71 commit 08c346d

File tree

6 files changed

+23
-29
lines changed

6 files changed

+23
-29
lines changed

cms-backend/src/api/annual-report/content-types/annual-report/schema.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
"type": "integer"
1717
},
1818
"file": {
19+
"type": "media",
20+
"multiple": false,
21+
"required": false,
1922
"allowedTypes": [
2023
"images",
2124
"files",
2225
"videos",
2326
"audios"
24-
],
25-
"type": "media",
26-
"multiple": true
27+
]
2728
}
2829
}
2930
}

cms-backend/src/api/risk-report/content-types/risk-report/schema.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@
3333
"type": "integer"
3434
},
3535
"file": {
36+
"type": "media",
37+
"multiple": false,
38+
"required": false,
3639
"allowedTypes": [
3740
"images",
3841
"files",
3942
"videos",
4043
"audios"
41-
],
42-
"type": "media",
43-
"multiple": true
44+
]
4445
}
4546
}
4647
}

cms-backend/src/api/treasury-report/content-types/treasury-report/schema.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@
3333
"type": "integer"
3434
},
3535
"file": {
36+
"type": "media",
37+
"multiple": false,
38+
"required": false,
3639
"allowedTypes": [
3740
"images",
3841
"files",
3942
"videos",
4043
"audios"
41-
],
42-
"type": "media",
43-
"multiple": true
44+
]
4445
}
4546
}
4647
}
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
{
22
"collectionName": "components_r_and_d_page_downloadable_formats",
33
"info": {
4-
"displayName": "DownloadableFormat"
4+
"displayName": "DownloadableFormat",
5+
"description": ""
56
},
67
"options": {},
78
"attributes": {
89
"name": {
910
"type": "string"
1011
},
1112
"file": {
13+
"type": "media",
14+
"multiple": false,
15+
"required": false,
1216
"allowedTypes": [
1317
"images",
1418
"files",
1519
"videos",
1620
"audios"
17-
],
18-
"type": "media",
19-
"multiple": true
21+
]
2022
}
2123
}
2224
}

cms-backend/types/generated/components.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,11 @@ export interface PnkTokenPageTokenStatDisplay extends Struct.ComponentSchema {
311311
export interface RAndDPageDownloadableFormat extends Struct.ComponentSchema {
312312
collectionName: 'components_r_and_d_page_downloadable_formats';
313313
info: {
314+
description: '';
314315
displayName: 'DownloadableFormat';
315316
};
316317
attributes: {
317-
file: Schema.Attribute.Media<
318-
'images' | 'files' | 'videos' | 'audios',
319-
true
320-
>;
318+
file: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
321319
name: Schema.Attribute.String;
322320
};
323321
}

cms-backend/types/generated/contentTypes.d.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,7 @@ export interface ApiAnnualReportAnnualReport
385385
createdAt: Schema.Attribute.DateTime;
386386
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
387387
Schema.Attribute.Private;
388-
file: Schema.Attribute.Media<
389-
'images' | 'files' | 'videos' | 'audios',
390-
true
391-
>;
388+
file: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
392389
locale: Schema.Attribute.String & Schema.Attribute.Private;
393390
localizations: Schema.Attribute.Relation<
394391
'oneToMany',
@@ -2333,10 +2330,7 @@ export interface ApiRiskReportRiskReport extends Struct.CollectionTypeSchema {
23332330
createdAt: Schema.Attribute.DateTime;
23342331
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
23352332
Schema.Attribute.Private;
2336-
file: Schema.Attribute.Media<
2337-
'images' | 'files' | 'videos' | 'audios',
2338-
true
2339-
>;
2333+
file: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
23402334
locale: Schema.Attribute.String & Schema.Attribute.Private;
23412335
localizations: Schema.Attribute.Relation<
23422336
'oneToMany',
@@ -2604,10 +2598,7 @@ export interface ApiTreasuryReportTreasuryReport
26042598
createdAt: Schema.Attribute.DateTime;
26052599
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
26062600
Schema.Attribute.Private;
2607-
file: Schema.Attribute.Media<
2608-
'images' | 'files' | 'videos' | 'audios',
2609-
true
2610-
>;
2601+
file: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
26112602
locale: Schema.Attribute.String & Schema.Attribute.Private;
26122603
localizations: Schema.Attribute.Relation<
26132604
'oneToMany',

0 commit comments

Comments
 (0)