Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 012bf2e

Browse files
committed
updating project model and adding contributor model
1 parent 29ea9b2 commit 012bf2e

File tree

5 files changed

+70
-11
lines changed

5 files changed

+70
-11
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"kind": "collectionType",
3+
"collectionName": "contributors",
4+
"info": {
5+
"singularName": "contributor",
6+
"pluralName": "contributors",
7+
"displayName": "Contributor",
8+
"description": ""
9+
},
10+
"options": {
11+
"draftAndPublish": true
12+
},
13+
"pluginOptions": {},
14+
"attributes": {
15+
"name": {
16+
"type": "string",
17+
"required": true
18+
},
19+
"twitterHandle": {
20+
"type": "string"
21+
},
22+
"discordHandle": {
23+
"type": "string"
24+
},
25+
"projects": {
26+
"type": "relation",
27+
"relation": "manyToMany",
28+
"target": "api::project.project",
29+
"inversedBy": "contributors"
30+
},
31+
"ens_name": {
32+
"type": "string"
33+
}
34+
}
35+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* contributor controller
5+
*/
6+
7+
const { createCoreController } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreController('api::contributor.contributor');
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* contributor router.
5+
*/
6+
7+
const { createCoreRouter } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreRouter('api::contributor.contributor');
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* contributor service.
5+
*/
6+
7+
const { createCoreService } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreService('api::contributor.contributor');

cms/src/api/project/content-types/project/schema.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,27 @@
6161
"type": "string",
6262
"required": true
6363
},
64-
"project_social_links": {
64+
"twitterUrl": {
6565
"pluginOptions": {
6666
"i18n": {
6767
"localized": true
6868
}
6969
},
70-
"type": "richtext"
70+
"type": "string"
7171
},
72-
"governance_proposal_links": {
72+
"website": {
7373
"pluginOptions": {
7474
"i18n": {
7575
"localized": true
7676
}
7777
},
78-
"type": "richtext",
79-
"required": false
78+
"type": "string"
8079
},
8180
"contributors": {
82-
"pluginOptions": {
83-
"i18n": {
84-
"localized": true
85-
}
86-
},
87-
"type": "richtext"
81+
"type": "relation",
82+
"relation": "manyToMany",
83+
"target": "api::contributor.contributor",
84+
"mappedBy": "projects"
8885
}
8986
}
9087
}

0 commit comments

Comments
 (0)