Skip to content

Commit

Permalink
feat: announcements (#47)
Browse files Browse the repository at this point in the history
* chore: add nvmrc

* feat: add announcement model

* chore: bump version to 0.9.0
  • Loading branch information
alfetopito authored Dec 16, 2024
1 parent d47c6c1 commit 4bc424e
Show file tree
Hide file tree
Showing 8 changed files with 2,943 additions and 566 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/iron
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cowprotocol/cms-parent",
"version": "0.8.0",
"version": "0.9.0",
"description": "Cow Protocol CMS",
"private": true,
"license": "(MIT OR Apache-2.0)",
Expand Down
34 changes: 34 additions & 0 deletions src/api/announcement/content-types/announcement/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"kind": "collectionType",
"collectionName": "announcements",
"info": {
"singularName": "announcement",
"pluralName": "announcements",
"displayName": "Announcement"
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"text": {
"type": "text",
"required": true
},
"networks": {
"type": "relation",
"relation": "oneToMany",
"target": "api::network.network"
},
"environments": {
"type": "relation",
"relation": "oneToMany",
"target": "api::environment.environment"
},
"isCritical": {
"type": "boolean",
"default": false,
"required": true
}
}
}
7 changes: 7 additions & 0 deletions src/api/announcement/controllers/announcement.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* announcement controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::announcement.announcement');
Loading

0 comments on commit 4bc424e

Please sign in to comment.