From 213b39c9a0cd3c61503914e0069ee7e7d34b80bf Mon Sep 17 00:00:00 2001 From: benguedj <71835422+benguedj@users.noreply.github.com> Date: Mon, 24 Oct 2022 18:16:49 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Ajoute=20la=20videothequ?= =?UTF-8?q?e=20sur=20le=20BO=20(#1482)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 🎸 Ajoute la videotheque sur le BO ✅ Closes: #1477 * fix: 🐛 PR Ajoute la videotheque sur le BO --- .../api/etape/models/etape.settings.json | 4 ++ .../evenement/models/evenement.settings.json | 4 ++ .../models/thematique.settings.json | 4 ++ back/strapi/api/video/config/routes.json | 52 +++++++++++++++++++ .../api/video/models/video.settings.json | 52 +++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 back/strapi/api/video/config/routes.json create mode 100644 back/strapi/api/video/models/video.settings.json diff --git a/back/strapi/api/etape/models/etape.settings.json b/back/strapi/api/etape/models/etape.settings.json index fa08a8306..b50ed6cc1 100644 --- a/back/strapi/api/etape/models/etape.settings.json +++ b/back/strapi/api/etape/models/etape.settings.json @@ -51,6 +51,10 @@ "parentheque_documents": { "via": "etapes", "collection": "parentheque-documents" + }, + "videos": { + "via": "etapes", + "collection": "video" } } } diff --git a/back/strapi/api/evenement/models/evenement.settings.json b/back/strapi/api/evenement/models/evenement.settings.json index f92af4430..3f306990c 100644 --- a/back/strapi/api/evenement/models/evenement.settings.json +++ b/back/strapi/api/evenement/models/evenement.settings.json @@ -52,6 +52,10 @@ "collection": "cartographie-types", "via": "evenements", "dominant": true + }, + "videos": { + "via": "evenements", + "collection": "video" } } } diff --git a/back/strapi/api/thematique/models/thematique.settings.json b/back/strapi/api/thematique/models/thematique.settings.json index cd881c7e3..ddc64fd15 100644 --- a/back/strapi/api/thematique/models/thematique.settings.json +++ b/back/strapi/api/thematique/models/thematique.settings.json @@ -33,6 +33,10 @@ "parentheque_documents": { "via": "thematique", "collection": "parentheque-documents" + }, + "videos": { + "via": "thematique", + "collection": "video" } } } diff --git a/back/strapi/api/video/config/routes.json b/back/strapi/api/video/config/routes.json new file mode 100644 index 000000000..c172a01ff --- /dev/null +++ b/back/strapi/api/video/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/videos", + "handler": "video.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/videos/count", + "handler": "video.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/videos/:id", + "handler": "video.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/videos", + "handler": "video.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/videos/:id", + "handler": "video.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/videos/:id", + "handler": "video.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/back/strapi/api/video/models/video.settings.json b/back/strapi/api/video/models/video.settings.json new file mode 100644 index 000000000..a0ada4745 --- /dev/null +++ b/back/strapi/api/video/models/video.settings.json @@ -0,0 +1,52 @@ +{ + "kind": "collectionType", + "collectionName": "videos", + "info": { + "name": "Video" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true + }, + "attributes": { + "nom": { + "type": "string" + }, + "description": { + "type": "string" + }, + "miniature": { + "model": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false, + "pluginOptions": {} + }, + "url": { + "type": "string" + }, + "etapes": { + "collection": "etape", + "via": "videos", + "dominant": true + }, + "thematique": { + "model": "thematique", + "via": "videos" + }, + "evenements": { + "collection": "evenement", + "via": "videos", + "dominant": true + }, + "ordre": { + "type": "integer" + } + } +}