update strapi definitions
This commit is contained in:
parent
54b8049488
commit
4c49c570b6
8 changed files with 114 additions and 1 deletions
38
strapi/src/api/blog/content-types/blog/schema.json
Normal file
38
strapi/src/api/blog/content-types/blog/schema.json
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "blogs",
|
||||
"info": {
|
||||
"singularName": "blog",
|
||||
"pluralName": "blogs",
|
||||
"displayName": "Blog",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"attributes": {
|
||||
"Title": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"unique": true
|
||||
},
|
||||
"Body": {
|
||||
"type": "richtext",
|
||||
"required": true
|
||||
},
|
||||
"Topics": {
|
||||
"displayName": "Tag",
|
||||
"type": "component",
|
||||
"repeatable": true,
|
||||
"component": "shared.tag"
|
||||
},
|
||||
"Header": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
7
strapi/src/api/blog/controllers/blog.ts
Normal file
7
strapi/src/api/blog/controllers/blog.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* blog controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreController('api::blog.blog');
|
||||
7
strapi/src/api/blog/routes/blog.ts
Normal file
7
strapi/src/api/blog/routes/blog.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* blog router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::blog.blog');
|
||||
7
strapi/src/api/blog/services/blog.ts
Normal file
7
strapi/src/api/blog/services/blog.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* blog service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::blog.blog');
|
||||
Loading…
Add table
Add a link
Reference in a new issue