Enabled multiple categories for weapons stories and glossary
This commit is contained in:
parent
ce842f0baf
commit
edfcff5b35
|
@ -36,11 +36,12 @@
|
|||
"target": "api::glossary-item-type.glossary-item-type"
|
||||
},
|
||||
"thumbnail": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "weapon_story_groups",
|
||||
"info": {
|
||||
"singularName": "weapon-story-group",
|
||||
"pluralName": "weapon-story-groups",
|
||||
"displayName": "🟤 Weapon Story Groups",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"weapons": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::weapon-story.weapon-story",
|
||||
"mappedBy": "weapon_group"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"unique": true,
|
||||
"regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* weapon-story-group controller
|
||||
*/
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::weapon-story-group.weapon-story-group');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* weapon-story-group router.
|
||||
*/
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::weapon-story-group.weapon-story-group');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* weapon-story-group service.
|
||||
*/
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::weapon-story-group.weapon-story-group');
|
|
@ -35,11 +35,18 @@
|
|||
"target": "api::weapon-story-type.weapon-story-type"
|
||||
},
|
||||
"thumbnail": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
]
|
||||
},
|
||||
"weapon_group": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::weapon-story-group.weapon-story-group",
|
||||
"inversedBy": "weapons"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"category": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::category.category"
|
||||
},
|
||||
"translations": {
|
||||
"displayName": "Glossary Definition",
|
||||
"type": "component",
|
||||
|
@ -22,6 +17,11 @@
|
|||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::source.source"
|
||||
},
|
||||
"categories": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::category.category"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,15 +14,15 @@
|
|||
"component": "translations.weapon-story-story",
|
||||
"required": false
|
||||
},
|
||||
"category": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::category.category"
|
||||
},
|
||||
"source": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::source.source"
|
||||
},
|
||||
"categories": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::category.category"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue