app.controller.js 438 Bytes
Newer Older
baesangjune's avatar
baesangjune committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Places from '../models/Place.js'
import cheerio from 'cheerio'
import axios from 'axios';

const searchRecommend = async (req, res, next,) => {
let responseRecommend = await Places.find({}).sort({updatedAt:-1})
res.send(responseRecommend[0])


}

const searchLatest = async (req, res, next) => {

    let responseLatest = await Places.find({})

    res.send(responseLatest[0])


}

export default { searchRecommend, searchLatest }