Add board feature
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "boards",
|
||||
"info": {
|
||||
"singularName": "board",
|
||||
"pluralName": "boards",
|
||||
"displayName": "Board",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"image": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
]
|
||||
},
|
||||
"choral": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::choral.choral",
|
||||
"inversedBy": "boards"
|
||||
},
|
||||
"unsplashImage": {
|
||||
"type": "string"
|
||||
},
|
||||
"board_lists": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::board-list.board-list",
|
||||
"mappedBy": "board"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* board controller
|
||||
*/
|
||||
|
||||
import { factories } from "@strapi/strapi";
|
||||
|
||||
export default factories.createCoreController(
|
||||
"api::board.board",
|
||||
({ strapi }) => ({
|
||||
async update(ctx) {
|
||||
return super.update(ctx);
|
||||
},
|
||||
async find(ctx) {
|
||||
console.log(ctx);
|
||||
return super.find(ctx);
|
||||
},
|
||||
})
|
||||
);
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* board router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::board.board');
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* board service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::board.board');
|
||||
Reference in New Issue
Block a user