Add board feature

This commit is contained in:
julien vdb
2025-03-28 14:52:43 +01:00
parent 9d4ecb2733
commit c6d5936639
23 changed files with 3485 additions and 11 deletions
@@ -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"
}
}
}
+18
View File
@@ -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);
},
})
);
+7
View File
@@ -0,0 +1,7 @@
/**
* board router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::board.board');
+7
View File
@@ -0,0 +1,7 @@
/**
* board service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::board.board');