diff --git a/src/api/content/content-types/content/schema.json b/src/api/content/content-types/content/schema.json index 17e707a..2a35017 100644 --- a/src/api/content/content-types/content/schema.json +++ b/src/api/content/content-types/content/schema.json @@ -42,22 +42,16 @@ "images" ] }, - "next_recommended": { - "type": "relation", - "relation": "oneToOne", - "target": "api::content.content", - "inversedBy": "previous_recommended" - }, - "previous_recommended": { - "type": "relation", - "relation": "oneToOne", - "target": "api::content.content", - "inversedBy": "next_recommended" - }, "translations": { "type": "component", "repeatable": true, "component": "translations.title" + }, + "group": { + "type": "relation", + "relation": "manyToOne", + "target": "api::contents-group.contents-group", + "inversedBy": "contents" } } } diff --git a/src/api/contents-group/content-types/contents-group/schema.json b/src/api/contents-group/content-types/contents-group/schema.json new file mode 100644 index 0000000..e9653af --- /dev/null +++ b/src/api/contents-group/content-types/contents-group/schema.json @@ -0,0 +1,32 @@ +{ + "kind": "collectionType", + "collectionName": "contents_groups", + "info": { + "singularName": "contents-group", + "pluralName": "contents-groups", + "displayName": "🟡 Contents Groups", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "attributes": { + "slug": { + "type": "string", + "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", + "unique": true, + "required": true + }, + "contents": { + "type": "relation", + "relation": "oneToMany", + "target": "api::content.content", + "mappedBy": "group" + }, + "combine": { + "type": "boolean", + "default": true, + "required": true + } + } +} diff --git a/src/api/contents-group/controllers/contents-group.js b/src/api/contents-group/controllers/contents-group.js new file mode 100644 index 0000000..a9cb9b5 --- /dev/null +++ b/src/api/contents-group/controllers/contents-group.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * contents-group controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::contents-group.contents-group'); diff --git a/src/api/contents-group/routes/contents-group.js b/src/api/contents-group/routes/contents-group.js new file mode 100644 index 0000000..5d4ed55 --- /dev/null +++ b/src/api/contents-group/routes/contents-group.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * contents-group router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::contents-group.contents-group'); diff --git a/src/api/contents-group/services/contents-group.js b/src/api/contents-group/services/contents-group.js new file mode 100644 index 0000000..5120c06 --- /dev/null +++ b/src/api/contents-group/services/contents-group.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * contents-group service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::contents-group.contents-group'); diff --git a/src/api/website-interface/content-types/website-interface/schema.json b/src/api/website-interface/content-types/website-interface/schema.json index 3fa0f09..1e8e7d1 100644 --- a/src/api/website-interface/content-types/website-interface/schema.json +++ b/src/api/website-interface/content-types/website-interface/schema.json @@ -399,6 +399,48 @@ }, "response_email_success": { "type": "string" + }, + "always_show_info": { + "type": "string" + }, + "item_not_available": { + "type": "string" + }, + "primary_language": { + "type": "string" + }, + "secondary_language": { + "type": "string" + }, + "combine_related_contents": { + "type": "string" + }, + "previous_content": { + "type": "string" + }, + "followup_content": { + "type": "string" + }, + "videos": { + "type": "string" + }, + "view_on": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "subscribers": { + "type": "string" + }, + "description": { + "type": "string" + }, + "available_at": { + "type": "string" + }, + "search_title": { + "type": "string" } } }