category.controller.js 333 Bytes
Newer Older
kusang96's avatar
kusang96 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import Category from "../schemas/Category.js";

const getCategory = async (req, res) => {
    try {
        const category = await Category.find({}, {_id: 0})
        res.json(category)
    } catch (error) {
        console.log(error)
        res.status(500).send('카테고리 검색 실패')
    }
}

export default { getCategory }