diff --git a/src/api/brand/content-types/brand/schema.json b/src/api/brand/content-types/brand/schema.json index 244e241..890324b 100644 --- a/src/api/brand/content-types/brand/schema.json +++ b/src/api/brand/content-types/brand/schema.json @@ -1,5 +1,5 @@ { - "kind": "singleType", + "kind": "collectionType", "collectionName": "brands", "info": { "singularName": "brand", @@ -11,33 +11,30 @@ }, "pluginOptions": { "i18n": { - "localized": false + "localized": true } }, "attributes": { "name": { "pluginOptions": { "i18n": { - "localized": false + "localized": true } }, - "type": "string", - "required": true, - "unique": true + "type": "string" }, "slug": { "pluginOptions": { "i18n": { - "localized": false + "localized": true } }, - "type": "string", - "unique": true + "type": "string" }, "shortDescription": { "pluginOptions": { "i18n": { - "localized": false + "localized": true } }, "type": "blocks" @@ -45,7 +42,7 @@ "description": { "pluginOptions": { "i18n": { - "localized": false + "localized": true } }, "type": "blocks" @@ -58,7 +55,7 @@ "multiple": false, "pluginOptions": { "i18n": { - "localized": false + "localized": true } } } diff --git a/src/api/brand/controllers/brand.ts b/src/api/brand/controllers/brand.ts new file mode 100644 index 0000000..db94674 --- /dev/null +++ b/src/api/brand/controllers/brand.ts @@ -0,0 +1,7 @@ +/** + * brand controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::brand.brand'); diff --git a/src/api/brand/routes/brand.ts b/src/api/brand/routes/brand.ts new file mode 100644 index 0000000..a7e2457 --- /dev/null +++ b/src/api/brand/routes/brand.ts @@ -0,0 +1,7 @@ +/** + * brand router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::brand.brand'); diff --git a/src/api/brand/services/brand.ts b/src/api/brand/services/brand.ts new file mode 100644 index 0000000..56dc616 --- /dev/null +++ b/src/api/brand/services/brand.ts @@ -0,0 +1,7 @@ +/** + * brand service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::brand.brand');