Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_heroes",
"info": {
"singularName": "brand-assets-page-hero",
"pluralName": "brand-assets-page-heroes",
"displayName": "BrandAssetsPageHero",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"button": {
"type": "component",
"repeatable": false,
"component": "content.button-link"
},
"background": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
Comment on lines +26 to +35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Restrict media types for background.

The background field allows unnecessary media types (files, videos, audios) for what appears to be a hero section background. Consider restricting to images only.

 "background": {
   "allowedTypes": [
-    "images",
-    "files",
-    "videos",
-    "audios"
+    "images"
   ],
   "type": "media",
-  "multiple": false
+  "multiple": false,
+  "required": true
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"background": {
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false
}
"background": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": true
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-hero controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-hero.brand-assets-page-hero');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-hero router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-hero.brand-assets-page-hero');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-hero service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-hero.brand-assets-page-hero');
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_kleros_badges_sections",
"info": {
"singularName": "brand-assets-page-kleros-badges-section",
"pluralName": "brand-assets-page-kleros-badges-sections",
"displayName": "BrandAssetsPageKlerosBadgesSection"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"imageDownloads": {
"type": "component",
"repeatable": true,
"component": "brand-assets-page.image-download"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-badges-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-kleros-badges-section.brand-assets-page-kleros-badges-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-badges-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-kleros-badges-section.brand-assets-page-kleros-badges-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-badges-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-kleros-badges-section.brand-assets-page-kleros-badges-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_kleros_colors_sections",
"info": {
"singularName": "brand-assets-page-kleros-colors-section",
"pluralName": "brand-assets-page-kleros-colors-sections",
"displayName": "BrandAssetsPageKlerosColorsSection",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"colorCards": {
"type": "component",
"repeatable": true,
"component": "brand-assets-page.color-card"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-colors-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-kleros-colors-section.brand-assets-page-kleros-colors-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-colors-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-kleros-colors-section.brand-assets-page-kleros-colors-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-colors-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-kleros-colors-section.brand-assets-page-kleros-colors-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_kleros_fonts_sections",
"info": {
"singularName": "brand-assets-page-kleros-fonts-section",
"pluralName": "brand-assets-page-kleros-fonts-sections",
"displayName": "BrandAssetsPageKlerosFontsSection"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"linkCard": {
"type": "component",
"repeatable": false,
"component": "content.link-card"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-fonts-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-kleros-fonts-section.brand-assets-page-kleros-fonts-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-fonts-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-kleros-fonts-section.brand-assets-page-kleros-fonts-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-fonts-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-kleros-fonts-section.brand-assets-page-kleros-fonts-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_kleros_logo_sections",
"info": {
"singularName": "brand-assets-page-kleros-logo-section",
"pluralName": "brand-assets-page-kleros-logo-sections",
"displayName": "BrandAssetsPageKlerosLogoSection"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"imageDownloads": {
"type": "component",
"repeatable": true,
"component": "brand-assets-page.image-download"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-logo-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-kleros-logo-section.brand-assets-page-kleros-logo-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-logo-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-kleros-logo-section.brand-assets-page-kleros-logo-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-kleros-logo-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-kleros-logo-section.brand-assets-page-kleros-logo-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_logos_package_sections",
"info": {
"singularName": "brand-assets-page-logos-package-section",
"pluralName": "brand-assets-page-logos-package-sections",
"displayName": "BrandAssetsPageLogosPackageSection"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"button": {
"type": "component",
"repeatable": false,
"component": "content.button-link"
},
"arrowLink": {
"type": "component",
"repeatable": false,
"component": "content.button-link"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-logos-package-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-logos-package-section.brand-assets-page-logos-package-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-logos-package-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-logos-package-section.brand-assets-page-logos-package-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-logos-package-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-logos-package-section.brand-assets-page-logos-package-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"kind": "singleType",
"collectionName": "brand_assets_page_pnk_token_sections",
"info": {
"singularName": "brand-assets-page-pnk-token-section",
"pluralName": "brand-assets-page-pnk-token-sections",
"displayName": "BrandAssetsPagePNKTokenSection"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"header": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"imageDownload": {
"type": "component",
"repeatable": false,
"component": "brand-assets-page.image-download"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-pnk-token-section controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::brand-assets-page-pnk-token-section.brand-assets-page-pnk-token-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-pnk-token-section router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::brand-assets-page-pnk-token-section.brand-assets-page-pnk-token-section');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* brand-assets-page-pnk-token-section service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::brand-assets-page-pnk-token-section.brand-assets-page-pnk-token-section');
Loading