refactoring , dockerizing
This commit is contained in:
31
yoga-cms/src/api/category/content-types/category/schema.json
Normal file
31
yoga-cms/src/api/category/content-types/category/schema.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "categories",
|
||||
"info": {
|
||||
"singularName": "category",
|
||||
"pluralName": "categories",
|
||||
"displayName": "Category",
|
||||
"description": "Organize your content into categories"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"type": "uid"
|
||||
},
|
||||
"articles": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::article.article",
|
||||
"mappedBy": "category"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
yoga-cms/src/api/category/controllers/category.ts
Normal file
7
yoga-cms/src/api/category/controllers/category.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* category controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::category.category');
|
||||
7
yoga-cms/src/api/category/routes/category.ts
Normal file
7
yoga-cms/src/api/category/routes/category.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* category router.
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::category.category');
|
||||
7
yoga-cms/src/api/category/services/category.ts
Normal file
7
yoga-cms/src/api/category/services/category.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* category service.
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::category.category');
|
||||
Reference in New Issue
Block a user