Skip to content

Commit

Permalink
feat(faq): ajout de la structure de la FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
juliebrunetto83 authored and Florian Leroy committed Mar 6, 2023
1 parent d310611 commit a89b39a
Show file tree
Hide file tree
Showing 9 changed files with 6,120 additions and 854 deletions.
827 changes: 437 additions & 390 deletions config/config-sync/files/admin-role.strapi-author.json

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions config/config-sync/files/admin-role.strapi-editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,51 @@
},
"conditions": []
},
{
"action": "plugin::content-manager.explorer.create",
"subject": "api::faq.faq",
"properties": {
"fields": [
"problematique",
"reponse"
]
},
"conditions": []
},
{
"action": "plugin::content-manager.explorer.delete",
"subject": "api::faq.faq",
"properties": {},
"conditions": []
},
{
"action": "plugin::content-manager.explorer.publish",
"subject": "api::faq.faq",
"properties": {},
"conditions": []
},
{
"action": "plugin::content-manager.explorer.read",
"subject": "api::faq.faq",
"properties": {
"fields": [
"problematique",
"reponse"
]
},
"conditions": []
},
{
"action": "plugin::content-manager.explorer.update",
"subject": "api::faq.faq",
"properties": {
"fields": [
"problematique",
"reponse"
]
},
"conditions": []
},
{
"action": "plugin::content-manager.explorer.create",
"subject": "api::fiche-metier.fiche-metier",
Expand Down
6 changes: 6 additions & 0 deletions config/config-sync/files/user-role.public.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
{
"action": "api::evenement.evenement.findOne"
},
{
"action": "api::faq.faq.find"
},
{
"action": "api::faq.faq.findOne"
},
{
"action": "api::fiche-metier.fiche-metier.find"
},
Expand Down
23 changes: 23 additions & 0 deletions src/api/faq/content-types/faq/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"kind": "collectionType",
"collectionName": "faqs",
"info": {
"singularName": "faq",
"pluralName": "faqs",
"displayName": "FAQ"
},
"options": {
"draftAndPublish": true
},
"attributes": {
"problematique": {
"type": "string",
"required": true
},
"reponse": {
"type": "relation",
"relation": "oneToOne",
"target": "api::article.article"
}
}
}
7 changes: 7 additions & 0 deletions src/api/faq/controllers/faq.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* faq controller
*/

import { factories } from '@strapi/strapi'

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

0 comments on commit a89b39a

Please sign in to comment.