Add board feature
This commit is contained in:
34
src/api/board-list/content-types/board-list/schema.json
Normal file
34
src/api/board-list/content-types/board-list/schema.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "board_lists",
|
||||
"info": {
|
||||
"singularName": "board-list",
|
||||
"pluralName": "board-lists",
|
||||
"displayName": "BoardList",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"order": {
|
||||
"type": "integer"
|
||||
},
|
||||
"board": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "api::board.board",
|
||||
"inversedBy": "board_lists"
|
||||
},
|
||||
"cards": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::board-card.board-card",
|
||||
"mappedBy": "boardList"
|
||||
}
|
||||
}
|
||||
}
|
||||
15
src/api/board-list/controllers/board-list.ts
Normal file
15
src/api/board-list/controllers/board-list.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* board-list controller
|
||||
*/
|
||||
|
||||
import { factories } from "@strapi/strapi";
|
||||
|
||||
export default factories.createCoreController(
|
||||
"api::board-list.board-list",
|
||||
({ strapi }) => ({
|
||||
async update(ctx) {
|
||||
console.log(ctx);
|
||||
return super.update(ctx);
|
||||
},
|
||||
})
|
||||
);
|
||||
7
src/api/board-list/routes/board-list.ts
Normal file
7
src/api/board-list/routes/board-list.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* board-list router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::board-list.board-list');
|
||||
7
src/api/board-list/services/board-list.ts
Normal file
7
src/api/board-list/services/board-list.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* board-list service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::board-list.board-list');
|
||||
Reference in New Issue
Block a user