Remove mizik
This commit is contained in:
@@ -37,11 +37,6 @@
|
||||
"plugin": "upload",
|
||||
"required": false
|
||||
},
|
||||
"miziks": {
|
||||
"collection": "mizik",
|
||||
"via": "awtis",
|
||||
"dominant": true
|
||||
},
|
||||
"teks": {
|
||||
"via": "awtis",
|
||||
"collection": "teks"
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/mizik",
|
||||
"handler": "mizik.find",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/mizik/count",
|
||||
"handler": "mizik.count",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/mizik/:id",
|
||||
"handler": "mizik.findOne",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "/mizik",
|
||||
"handler": "mizik.create",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"path": "/mizik/:id",
|
||||
"handler": "mizik.update",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "DELETE",
|
||||
"path": "/mizik/:id",
|
||||
"handler": "mizik.delete",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
|
||||
* to customize this controller
|
||||
*/
|
||||
|
||||
module.exports = {};
|
||||
@@ -1,25 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
const slugify = require('slugify')
|
||||
|
||||
const jwennAwtisEpiId = async data => {
|
||||
const awtis = await strapi.query('awtis').find({_id: data})
|
||||
return awtis.map(a => a.alias).join('-')
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
lifecycles: {
|
||||
beforeCreate: async data => {
|
||||
if (data.titre) {
|
||||
const awtis = await jwennAwtisEpiId(data.awtis)
|
||||
data.slug = slugify(`${awtis}-${data.titre}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||
}
|
||||
},
|
||||
beforeUpdate: async (params, data) => {
|
||||
if (data.titre) {
|
||||
const awtis = await jwennAwtisEpiId(data.awtis)
|
||||
data.slug = slugify(`${awtis}-${data.titre}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "mizik",
|
||||
"info": {
|
||||
"name": "mizik",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"increments": true,
|
||||
"timestamps": true,
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"attributes": {
|
||||
"titre": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"transcription": {
|
||||
"type": "richtext"
|
||||
},
|
||||
"traductions": {
|
||||
"type": "component",
|
||||
"repeatable": false,
|
||||
"component": "trad.traductions"
|
||||
},
|
||||
"annee": {
|
||||
"type": "integer"
|
||||
},
|
||||
"liens": {
|
||||
"type": "component",
|
||||
"repeatable": true,
|
||||
"component": "url.liens"
|
||||
},
|
||||
"awtis": {
|
||||
"via": "miziks",
|
||||
"collection": "awtis"
|
||||
},
|
||||
"kouteyAchtey": {
|
||||
"type": "component",
|
||||
"repeatable": true,
|
||||
"component": "store.store"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
"cover": {
|
||||
"model": "file",
|
||||
"via": "related",
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
],
|
||||
"plugin": "upload",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
|
||||
* to customize this service
|
||||
*/
|
||||
|
||||
module.exports = {};
|
||||
Reference in New Issue
Block a user