Commit 1e7f2bab authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

ppt주문완료까지

parent b4557a68
...@@ -98,6 +98,19 @@ const categoryId = async (req, res, next, category) => { ...@@ -98,6 +98,19 @@ const categoryId = async (req, res, next, category) => {
} }
} }
const sortingProduct = async (req,res) =>{
try {
const productslist = await Product.find({ main_category: category })
const length = productslist.length
req.length = length
const productsPiece = await Product.find({ main_category: category }).skip((req.query.page - 1) * per).limit(per)
req.productsPiece = productsPiece
} catch (error) {
}
}
const subname = async (req, res) => { const subname = async (req, res) => {
const per = 9; const per = 9;
try { try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment