diff --git a/src/api/content/content-types/content/schema.json b/src/api/content/content-types/content/schema.json index ad82294..7a4985e 100644 --- a/src/api/content/content-types/content/schema.json +++ b/src/api/content/content-types/content/schema.json @@ -57,6 +57,13 @@ "type": "component", "repeatable": true, "component": "sets.audio-set" + }, + "thumbnail": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false } } } diff --git a/src/api/library-item/content-types/library-item/schema.json b/src/api/library-item/content-types/library-item/schema.json index 7db60f0..ec58f5a 100644 --- a/src/api/library-item/content-types/library-item/schema.json +++ b/src/api/library-item/content-types/library-item/schema.json @@ -74,7 +74,9 @@ "metadata.books", "metadata.video", "metadata.game", - "metadata.audio" + "metadata.audio", + "metadata.merch", + "metadata.other" ], "max": 1 }, diff --git a/src/api/merch-item/content-types/merch-item/schema.json b/src/api/merch-item/content-types/merch-item/schema.json new file mode 100644 index 0000000..1d7ffe6 --- /dev/null +++ b/src/api/merch-item/content-types/merch-item/schema.json @@ -0,0 +1,20 @@ +{ + "kind": "collectionType", + "collectionName": "merch_items", + "info": { + "singularName": "merch-item", + "pluralName": "merch-items", + "displayName": "Merch Items" + }, + "options": { + "draftAndPublish": false + }, + "attributes": { + "slug": { + "type": "string", + "required": true, + "unique": true, + "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + } + } +} diff --git a/src/api/merch-item/controllers/merch-item.js b/src/api/merch-item/controllers/merch-item.js new file mode 100644 index 0000000..261b311 --- /dev/null +++ b/src/api/merch-item/controllers/merch-item.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * merch-item controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::merch-item.merch-item'); diff --git a/src/api/merch-item/routes/merch-item.js b/src/api/merch-item/routes/merch-item.js new file mode 100644 index 0000000..f61dfda --- /dev/null +++ b/src/api/merch-item/routes/merch-item.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * merch-item router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::merch-item.merch-item'); diff --git a/src/api/merch-item/services/merch-item.js b/src/api/merch-item/services/merch-item.js new file mode 100644 index 0000000..9b8e5cc --- /dev/null +++ b/src/api/merch-item/services/merch-item.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * merch-item service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::merch-item.merch-item'); diff --git a/src/api/other-subtype/content-types/other-subtype/schema.json b/src/api/other-subtype/content-types/other-subtype/schema.json new file mode 100644 index 0000000..e51236e --- /dev/null +++ b/src/api/other-subtype/content-types/other-subtype/schema.json @@ -0,0 +1,21 @@ +{ + "kind": "collectionType", + "collectionName": "other_subtypes", + "info": { + "singularName": "other-subtype", + "pluralName": "other-subtypes", + "displayName": "Other Subtypes", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "attributes": { + "slug": { + "type": "string", + "required": true, + "unique": true, + "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + } + } +} diff --git a/src/api/other-subtype/controllers/other-subtype.js b/src/api/other-subtype/controllers/other-subtype.js new file mode 100644 index 0000000..7f9d8eb --- /dev/null +++ b/src/api/other-subtype/controllers/other-subtype.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * other-subtype controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::other-subtype.other-subtype'); diff --git a/src/api/other-subtype/routes/other-subtype.js b/src/api/other-subtype/routes/other-subtype.js new file mode 100644 index 0000000..605cd9c --- /dev/null +++ b/src/api/other-subtype/routes/other-subtype.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * other-subtype router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::other-subtype.other-subtype'); diff --git a/src/api/other-subtype/services/other-subtype.js b/src/api/other-subtype/services/other-subtype.js new file mode 100644 index 0000000..0cc2d17 --- /dev/null +++ b/src/api/other-subtype/services/other-subtype.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * other-subtype service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::other-subtype.other-subtype'); diff --git a/src/components/metadata/merch.json b/src/components/metadata/merch.json new file mode 100644 index 0000000..9212971 --- /dev/null +++ b/src/components/metadata/merch.json @@ -0,0 +1,15 @@ +{ + "collectionName": "components_metadata_merches", + "info": { + "displayName": "Merch", + "icon": "gift" + }, + "options": {}, + "attributes": { + "merch_item": { + "type": "relation", + "relation": "oneToOne", + "target": "api::merch-item.merch-item" + } + } +} diff --git a/src/components/metadata/other.json b/src/components/metadata/other.json new file mode 100644 index 0000000..acedfcf --- /dev/null +++ b/src/components/metadata/other.json @@ -0,0 +1,16 @@ +{ + "collectionName": "components_metadata_others", + "info": { + "displayName": "Other", + "icon": "apple-alt", + "description": "" + }, + "options": {}, + "attributes": { + "subtype": { + "type": "relation", + "relation": "oneToOne", + "target": "api::other-subtype.other-subtype" + } + } +}