This commit is contained in:
srgooglo 2022-09-07 17:44:11 +02:00
parent 1d42463c85
commit 4d4b9b3050

View File

@ -10,13 +10,13 @@ export default class PublicController extends Controller {
"/featured_wallpapers": {
fn: async (req, res) => {
const featuredWallpapers = await FeaturedWallpaper.find({})
.sort({ date: -1 })
.limit(10)
.catch(err => {
return res.status(500).json({
error: err.message
}).end()
})
.sort({ date: -1 })
.limit(10)
.catch(err => {
return res.status(500).json({
error: err.message
}).end()
})
return res.json(featuredWallpapers)
}