date stuff

This commit is contained in:
2020-09-28 16:02:16 +02:00
parent e4ef072769
commit 4c58bfc4cc
5 changed files with 11 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { respond, getAll, getOne, sortByAndMapDate } from '../../lib/wp'
import { respond, getAll, getOne, sortByDate } from '../../lib/wp'
export async function get(req, res) {
const [type, slug] = req.params.slug
@@ -8,6 +8,6 @@ export async function get(req, res) {
respond(res, { data })
} else {
const data = await getAll(type)
respond(res, { data: sortByAndMapDate(data) })
respond(res, { data: sortByDate(data) })
}
}