Skip to content

Commit

Permalink
feat: 🎸 Ajoute la videotheque sur le BO (#1482)
Browse files Browse the repository at this point in the history
* feat: 🎸 Ajoute la videotheque sur le BO

✅ Closes: #1477

* fix: 🐛 PR Ajoute la videotheque sur le BO
  • Loading branch information
benguedj authored Oct 24, 2022
1 parent 7ab77fa commit 213b39c
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 0 deletions.
4 changes: 4 additions & 0 deletions back/strapi/api/etape/models/etape.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"parentheque_documents": {
"via": "etapes",
"collection": "parentheque-documents"
},
"videos": {
"via": "etapes",
"collection": "video"
}
}
}
4 changes: 4 additions & 0 deletions back/strapi/api/evenement/models/evenement.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"collection": "cartographie-types",
"via": "evenements",
"dominant": true
},
"videos": {
"via": "evenements",
"collection": "video"
}
}
}
4 changes: 4 additions & 0 deletions back/strapi/api/thematique/models/thematique.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"parentheque_documents": {
"via": "thematique",
"collection": "parentheque-documents"
},
"videos": {
"via": "thematique",
"collection": "video"
}
}
}
52 changes: 52 additions & 0 deletions back/strapi/api/video/config/routes.json
Original file line number Diff line number Diff line change
@@ -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": []
}
}
]
}
52 changes: 52 additions & 0 deletions back/strapi/api/video/models/video.settings.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}

0 comments on commit 213b39c

Please sign in to comment.