Move and update models to content-types
This commit is contained in:
@@ -1,50 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
|
|
||||||
* to customize this model
|
|
||||||
*/
|
|
||||||
|
|
||||||
const slugify = require('slugify')
|
|
||||||
|
|
||||||
const jwennTeksEpiId = async data => {
|
|
||||||
const teks = await strapi.query('teks').find({id_in: data})
|
|
||||||
return teks
|
|
||||||
}
|
|
||||||
|
|
||||||
const jwennAwtisEpiId = async id => {
|
|
||||||
const awtis = await strapi.query('awtis').find({id})
|
|
||||||
return awtis
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
lifecycles: {
|
|
||||||
beforeUpdate: async (params, data) => {
|
|
||||||
if (!data.slug) {
|
|
||||||
data.slug = slugify(data.alias, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeCreate: async data => {
|
|
||||||
data.slug = slugify(data.alias, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
|
||||||
},
|
|
||||||
afterUpdate: async (params, data) => {
|
|
||||||
const {id} = data
|
|
||||||
const awtis = await jwennAwtisEpiId(id)
|
|
||||||
|
|
||||||
if (awtis.teks && awtis.teks.length >= 1) {
|
|
||||||
const teks = await jwennTeksEpiId(awtis.teks)
|
|
||||||
Promise.all(teks.map(async t => {
|
|
||||||
const {id, tit, slug, awtis} = t
|
|
||||||
const alias = awtis.map(a => a.alias).join('-')
|
|
||||||
const slugUpdated = slugify(`${alias}-${tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
|
||||||
if (slug !== slugUpdated) {
|
|
||||||
await strapi.query('teks').update(
|
|
||||||
{id},
|
|
||||||
{slug: slugUpdated}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const jwennTeksEpiId = async teksId => {
|
|
||||||
const teks = await strapi.query('teks').findOne({id: teksId})
|
|
||||||
return teks
|
|
||||||
}
|
|
||||||
|
|
||||||
const jwennUserEpiId = async userId => {
|
|
||||||
const user = await strapi.query('user', 'users-permissions').findOne({id: userId})
|
|
||||||
return user
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
lifecycles: {
|
|
||||||
beforeCreate: async data => {
|
|
||||||
if (data.kontni && data.teks && data.user) {
|
|
||||||
const teks = await jwennTeksEpiId(data.teks)
|
|
||||||
const user = await jwennUserEpiId(data.user)
|
|
||||||
|
|
||||||
if(!teks || !user) {
|
|
||||||
throw strapi.errors.badRequest('Not found')
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
throw strapi.errors.badRequest('Missing fields')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
afterCreate: async data => {
|
|
||||||
if (data.user) {
|
|
||||||
strapi.services.email.send(
|
|
||||||
process.env.SMTP_FROM,
|
|
||||||
process.env.SMTP_SEND_TO,
|
|
||||||
`Nouveau commentaire de ${data.user.username}`,
|
|
||||||
data.kontni
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const slugify = require('slugify')
|
|
||||||
const axios = require('axios')
|
|
||||||
|
|
||||||
const TELEGRAM_API_URL = 'https://api.telegram.org'
|
|
||||||
const TELEGRAM_CHAN_ID = process.env.TELEGRAM_CHAN_ID || null
|
|
||||||
const TELEGRAM_API_TOKEN = process.env.TELEGRAM_API_TOKEN || null
|
|
||||||
const MESSAGE_URL = `${TELEGRAM_API_URL}/bot${TELEGRAM_API_TOKEN}/sendMessage?chat_id=${TELEGRAM_CHAN_ID}&parse_mode=html`
|
|
||||||
|
|
||||||
const jwennAwtisEpiId = async data => {
|
|
||||||
const awtis = await strapi.query('awtis').find({id: data})
|
|
||||||
return awtis.map(a => a.alias).join('-')
|
|
||||||
}
|
|
||||||
|
|
||||||
const jwennUserEpiId = async userId => {
|
|
||||||
if (!userId) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = await strapi.query('user', 'users-permissions').findOne({id: userId})
|
|
||||||
return user
|
|
||||||
}
|
|
||||||
|
|
||||||
const jwennUserAdminEpiId = async userAdminId => {
|
|
||||||
if (!userAdminId) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = await strapi.query('user', 'admin').findOne({id: userAdminId, 'roles.code_nin': 'strapi-super-admin'})
|
|
||||||
return user
|
|
||||||
}
|
|
||||||
|
|
||||||
const translateTeks = async teksFR => {
|
|
||||||
const english = await strapi.services.translator.translate('FR', 'EN', teksFR)
|
|
||||||
const espagnol = await strapi.services.translator.translate('FR', 'ES', teksFR)
|
|
||||||
const deutsch = await strapi.services.translator.translate('FR', 'DE', teksFR)
|
|
||||||
const italiano = await strapi.services.translator.translate('FR', 'IT', teksFR)
|
|
||||||
|
|
||||||
return {
|
|
||||||
francais: teksFR,
|
|
||||||
english: english + '\n\n (Translated by DeepL)',
|
|
||||||
espagnol: espagnol + '\n\n (Traducido por DeepL)',
|
|
||||||
deutsch: deutsch + '\n\n (Übersetzt von DeepL)',
|
|
||||||
italiano: italiano + '\n\n (Tradotto da DeepL)'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
lifecycles: {
|
|
||||||
beforeCreate: async data => {
|
|
||||||
const user = await jwennUserEpiId(data?.user?.id)
|
|
||||||
const userAdmin = await jwennUserAdminEpiId(data?.created_by)
|
|
||||||
|
|
||||||
if (userAdmin) {
|
|
||||||
data.userAdmin = userAdmin.username
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.tit && !data.forceSlug) {
|
|
||||||
const awtis = await jwennAwtisEpiId(data.awtis)
|
|
||||||
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (user && user.canAutoTranslate && data.tradiksyonOtomatik && data.tradiksyon.francais && (!data.tradiksyon.english || !data.tradiksyon.espagnol || !data.tradiksyon.deutsch || !data.tradiksyon.italiano)) {
|
|
||||||
const traslate = await translateTeks(data.tradiksyon.francais)
|
|
||||||
data.tradiksyon = traslate
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
beforeUpdate: async (params, data) => {
|
|
||||||
if (data.tit && !data.forceSlug) {
|
|
||||||
const awtis = await jwennAwtisEpiId(data.awtis)
|
|
||||||
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
|
||||||
}
|
|
||||||
if (data.published_at != null) {
|
|
||||||
const {id} = params
|
|
||||||
const previousData = await strapi.query('teks').findOne({id})
|
|
||||||
|
|
||||||
const previousPublishedAt = previousData.published_at
|
|
||||||
const currentPublished_at = data.published_at
|
|
||||||
if (currentPublished_at != previousPublishedAt) {
|
|
||||||
const message = `<b>Nouvelle publication</b> \xF0\x9F\x8E\xB6 \xF0\x9F\x94\xA5
|
|
||||||
\n${process.env.WEBSITE_URL}/paroles/${previousData.slug}`
|
|
||||||
if (previousData.user) {
|
|
||||||
strapi.services.email.send(
|
|
||||||
process.env.SMTP_FROM,
|
|
||||||
previousData.user.email,
|
|
||||||
`Publication de "${previousData.tit}"`,
|
|
||||||
`Le titre que vous avez soumis, "${previousData.tit}" a été publié sur le site. Vous pouvez le trouver à l'adresse ${process.env.WEBSITE_URL}/paroles/${previousData.slug}`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = await jwennUserAdminEpiId(previousData?.created_by?.id)
|
|
||||||
|
|
||||||
if (user) {
|
|
||||||
strapi.services.email.send(
|
|
||||||
process.env.SMTP_FROM,
|
|
||||||
user.email,
|
|
||||||
`Publication de "${previousData.tit}"`,
|
|
||||||
`Le titre que vous avez soumis, "${previousData.tit}" a été publié sur le site. Vous pouvez le trouver à l'adresse ${process.env.WEBSITE_URL}/paroles/${previousData.slug}`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
await axios.post(`${MESSAGE_URL}&text=${message}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
afterCreate: async data => {
|
|
||||||
if (data.user) {
|
|
||||||
strapi.services.email.send(
|
|
||||||
process.env.SMTP_FROM,
|
|
||||||
process.env.SMTP_SEND_TO,
|
|
||||||
`Nouveau texte de ${data.user.username} : "${data.tit}" (site)`,
|
|
||||||
`Le titre "${data.tit}" a été soumis depuis le site.`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const user = await jwennUserAdminEpiId(data?.created_by?.id)
|
|
||||||
|
|
||||||
if (user) {
|
|
||||||
strapi.services.email.send(
|
|
||||||
process.env.SMTP_FROM,
|
|
||||||
process.env.SMTP_SEND_TO,
|
|
||||||
`Nouveau texte de ${user.username} : "${data.tit}" (dashboard)`,
|
|
||||||
`Le titre "${data.tit}" a été soumis depuis le dashboard.`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
|
||||||
|
* to customize this model
|
||||||
|
*/
|
||||||
|
|
||||||
|
const slugify = require('slugify')
|
||||||
|
|
||||||
|
const jwennTeksEpiId = async data => {
|
||||||
|
const teks = await strapi.query('teks').find({id_in: data})
|
||||||
|
return teks
|
||||||
|
}
|
||||||
|
|
||||||
|
const jwennAwtisEpiId = async id => {
|
||||||
|
const awtis = await strapi.query('awtis').find({id})
|
||||||
|
return awtis
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
beforeUpdate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
|
||||||
|
if (!data.slug) {
|
||||||
|
data.slug = slugify(data.alias, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeCreate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
|
||||||
|
data.slug = slugify(data.alias, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||||
|
},
|
||||||
|
afterUpdate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
const {id} = data
|
||||||
|
const awtis = await jwennAwtisEpiId(id)
|
||||||
|
|
||||||
|
if (awtis.teks && awtis.teks.length >= 1) {
|
||||||
|
const teks = await jwennTeksEpiId(awtis.teks)
|
||||||
|
Promise.all(teks.map(async t => {
|
||||||
|
const {id, tit, slug, awtis} = t
|
||||||
|
const alias = awtis.map(a => a.alias).join('-')
|
||||||
|
const slugUpdated = slugify(`${alias}-${tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||||
|
if (slug !== slugUpdated) {
|
||||||
|
await strapi.query('teks').update(
|
||||||
|
{id},
|
||||||
|
{slug: slugUpdated}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
"kind": "collectionType",
|
"kind": "collectionType",
|
||||||
"collectionName": "awtis",
|
"collectionName": "awtis",
|
||||||
"info": {
|
"info": {
|
||||||
|
"singularName": "awti",
|
||||||
|
"pluralName": "awtis",
|
||||||
|
"displayName": "Awtis",
|
||||||
"name": "awtis",
|
"name": "awtis",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
@@ -39,8 +42,10 @@
|
|||||||
"pluginOptions": {}
|
"pluginOptions": {}
|
||||||
},
|
},
|
||||||
"teks": {
|
"teks": {
|
||||||
"via": "awtis",
|
"type": "relation",
|
||||||
"collection": "teks"
|
"relation": "manyToMany",
|
||||||
|
"target": "api::tek.tek",
|
||||||
|
"inversedBy": "teks"
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"plugin": "users-permissions",
|
"plugin": "users-permissions",
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const jwennTeksEpiId = async teksId => {
|
||||||
|
const teks = await strapi.query('teks').findOne({id: teksId})
|
||||||
|
return teks
|
||||||
|
}
|
||||||
|
|
||||||
|
const jwennUserEpiId = async userId => {
|
||||||
|
const user = await strapi.query('user', 'users-permissions').findOne({id: userId})
|
||||||
|
return user
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
beforeCreate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
|
||||||
|
if (data.kontni && data.teks && data.user) {
|
||||||
|
const teks = await jwennTeksEpiId(data.teks)
|
||||||
|
const user = await jwennUserEpiId(data.user)
|
||||||
|
|
||||||
|
if(!teks || !user) {
|
||||||
|
throw strapi.errors.badRequest('Not found')
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
throw strapi.errors.badRequest('Missing fields')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
afterCreate: async data => {
|
||||||
|
if (data.user) {
|
||||||
|
strapi.services.email.send(
|
||||||
|
process.env.SMTP_FROM,
|
||||||
|
process.env.SMTP_SEND_TO,
|
||||||
|
`Nouveau commentaire de ${data.user.username}`,
|
||||||
|
data.kontni
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
"kind": "collectionType",
|
"kind": "collectionType",
|
||||||
"collectionName": "komante",
|
"collectionName": "komante",
|
||||||
"info": {
|
"info": {
|
||||||
|
"singularName": "komant",
|
||||||
|
"pluralName": "komante",
|
||||||
|
"displayName": "Komante",
|
||||||
"name": "komante",
|
"name": "komante",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
@@ -24,8 +27,9 @@
|
|||||||
"model": "user"
|
"model": "user"
|
||||||
},
|
},
|
||||||
"teks": {
|
"teks": {
|
||||||
"via": "komante",
|
"type": "relation",
|
||||||
"model": "teks"
|
"relation": "oneToOne",
|
||||||
|
"target": "api::tek.tek"
|
||||||
},
|
},
|
||||||
"sentAt": {
|
"sentAt": {
|
||||||
"type": "datetime",
|
"type": "datetime",
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const slugify = require('slugify')
|
||||||
|
const axios = require('axios')
|
||||||
|
|
||||||
|
const TELEGRAM_API_URL = 'https://api.telegram.org'
|
||||||
|
const TELEGRAM_CHAN_ID = process.env.TELEGRAM_CHAN_ID || null
|
||||||
|
const TELEGRAM_API_TOKEN = process.env.TELEGRAM_API_TOKEN || null
|
||||||
|
const MESSAGE_URL = `${TELEGRAM_API_URL}/bot${TELEGRAM_API_TOKEN}/sendMessage?chat_id=${TELEGRAM_CHAN_ID}&parse_mode=html`
|
||||||
|
|
||||||
|
const jwennAwtisEpiId = async data => {
|
||||||
|
const awtis = await strapi.query('awtis').find({id: data})
|
||||||
|
return awtis.map(a => a.alias).join('-')
|
||||||
|
}
|
||||||
|
|
||||||
|
const jwennUserEpiId = async userId => {
|
||||||
|
if (!userId) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const user = await strapi.query('user', 'users-permissions').findOne({id: userId})
|
||||||
|
return user
|
||||||
|
}
|
||||||
|
|
||||||
|
const jwennUserAdminEpiId = async userAdminId => {
|
||||||
|
if (!userAdminId) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const user = await strapi.query('user', 'admin').findOne({id: userAdminId, 'roles.code_nin': 'strapi-super-admin'})
|
||||||
|
return user
|
||||||
|
}
|
||||||
|
|
||||||
|
const translateTeks = async teksFR => {
|
||||||
|
const english = await strapi.services.translator.translate('FR', 'EN', teksFR)
|
||||||
|
const espagnol = await strapi.services.translator.translate('FR', 'ES', teksFR)
|
||||||
|
const deutsch = await strapi.services.translator.translate('FR', 'DE', teksFR)
|
||||||
|
const italiano = await strapi.services.translator.translate('FR', 'IT', teksFR)
|
||||||
|
|
||||||
|
return {
|
||||||
|
francais: teksFR,
|
||||||
|
english: english + '\n\n (Translated by DeepL)',
|
||||||
|
espagnol: espagnol + '\n\n (Traducido por DeepL)',
|
||||||
|
deutsch: deutsch + '\n\n (Übersetzt von DeepL)',
|
||||||
|
italiano: italiano + '\n\n (Tradotto da DeepL)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
beforeCreate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
const user = await jwennUserEpiId(data?.user?.id)
|
||||||
|
const userAdmin = await jwennUserAdminEpiId(data?.created_by)
|
||||||
|
|
||||||
|
if (userAdmin) {
|
||||||
|
data.userAdmin = userAdmin.username
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.tit && !data.forceSlug) {
|
||||||
|
const awtis = await jwennAwtisEpiId(data.awtis)
|
||||||
|
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user && user.canAutoTranslate && data.tradiksyonOtomatik && data.tradiksyon.francais && (!data.tradiksyon.english || !data.tradiksyon.espagnol || !data.tradiksyon.deutsch || !data.tradiksyon.italiano)) {
|
||||||
|
const traslate = await translateTeks(data.tradiksyon.francais)
|
||||||
|
data.tradiksyon = traslate
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
beforeUpdate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
|
||||||
|
if (data.tit && !data.forceSlug) {
|
||||||
|
const awtis = await jwennAwtisEpiId(data.awtis)
|
||||||
|
data.slug = slugify(`${awtis}-${data.tit}`, {lower: true, remove: /[*#+~.()'"!:@]/g})
|
||||||
|
}
|
||||||
|
if (data.published_at != null) {
|
||||||
|
const {id} = params
|
||||||
|
const previousData = await strapi.query('teks').findOne({id})
|
||||||
|
|
||||||
|
const previousPublishedAt = previousData.published_at
|
||||||
|
const currentPublished_at = data.published_at
|
||||||
|
if (currentPublished_at != previousPublishedAt) {
|
||||||
|
const message = `<b>Nouvelle publication</b> \xF0\x9F\x8E\xB6 \xF0\x9F\x94\xA5
|
||||||
|
\n${process.env.WEBSITE_URL}/paroles/${previousData.slug}`
|
||||||
|
if (previousData.user) {
|
||||||
|
strapi.services.email.send(
|
||||||
|
process.env.SMTP_FROM,
|
||||||
|
previousData.user.email,
|
||||||
|
`Publication de "${previousData.tit}"`,
|
||||||
|
`Le titre que vous avez soumis, "${previousData.tit}" a été publié sur le site. Vous pouvez le trouver à l'adresse ${process.env.WEBSITE_URL}/paroles/${previousData.slug}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const user = await jwennUserAdminEpiId(previousData?.created_by?.id)
|
||||||
|
|
||||||
|
if (user) {
|
||||||
|
strapi.services.email.send(
|
||||||
|
process.env.SMTP_FROM,
|
||||||
|
user.email,
|
||||||
|
`Publication de "${previousData.tit}"`,
|
||||||
|
`Le titre que vous avez soumis, "${previousData.tit}" a été publié sur le site. Vous pouvez le trouver à l'adresse ${process.env.WEBSITE_URL}/paroles/${previousData.slug}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
await axios.post(`${MESSAGE_URL}&text=${message}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
afterCreate: async event => {
|
||||||
|
let {data} = event
|
||||||
|
|
||||||
|
if (data.user) {
|
||||||
|
strapi.services.email.send(
|
||||||
|
process.env.SMTP_FROM,
|
||||||
|
process.env.SMTP_SEND_TO,
|
||||||
|
`Nouveau texte de ${data.user.username} : "${data.tit}" (site)`,
|
||||||
|
`Le titre "${data.tit}" a été soumis depuis le site.`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const user = await jwennUserAdminEpiId(data?.created_by?.id)
|
||||||
|
|
||||||
|
if (user) {
|
||||||
|
strapi.services.email.send(
|
||||||
|
process.env.SMTP_FROM,
|
||||||
|
process.env.SMTP_SEND_TO,
|
||||||
|
`Nouveau texte de ${user.username} : "${data.tit}" (dashboard)`,
|
||||||
|
`Le titre "${data.tit}" a été soumis depuis le dashboard.`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
"kind": "collectionType",
|
"kind": "collectionType",
|
||||||
"collectionName": "teks",
|
"collectionName": "teks",
|
||||||
"info": {
|
"info": {
|
||||||
|
"singularName": "tek",
|
||||||
|
"pluralName": "teks",
|
||||||
|
"displayName": "Teks",
|
||||||
"name": "Teks",
|
"name": "Teks",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
@@ -33,9 +36,10 @@
|
|||||||
"component": "url.liens"
|
"component": "url.liens"
|
||||||
},
|
},
|
||||||
"awtis": {
|
"awtis": {
|
||||||
"via": "teks",
|
"type": "relation",
|
||||||
"collection": "awtis",
|
"relation": "manyToMany",
|
||||||
"dominant": true
|
"target": "api::awti.awti",
|
||||||
|
"mappedBy": "tek"
|
||||||
},
|
},
|
||||||
"kouteyAchtey": {
|
"kouteyAchtey": {
|
||||||
"type": "component",
|
"type": "component",
|
||||||
@@ -66,8 +70,9 @@
|
|||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"komante": {
|
"komante": {
|
||||||
"via": "teks",
|
"type": "relation",
|
||||||
"collection": "komante"
|
"relation": "oneToOne",
|
||||||
|
"target": "api::komant.komant"
|
||||||
},
|
},
|
||||||
"forceSlug": {
|
"forceSlug": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
Reference in New Issue
Block a user