Exclude draft from '/slugs'
This commit is contained in:
@@ -2,7 +2,7 @@ module.exports = {
|
|||||||
index: async ctx => {
|
index: async ctx => {
|
||||||
const result = await strapi
|
const result = await strapi
|
||||||
.query('teks')
|
.query('teks')
|
||||||
.model.find({})
|
.model.find({published_at: {$ne: null}})
|
||||||
const sortedResult = result.sort((a, b) => {
|
const sortedResult = result.sort((a, b) => {
|
||||||
const aDate = new Date(a.published_at)
|
const aDate = new Date(a.published_at)
|
||||||
const bDate = new Date(b.published_at)
|
const bDate = new Date(b.published_at)
|
||||||
|
|||||||
Reference in New Issue
Block a user