Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
shopping-mall
Commits
1e7f2bab
Commit
1e7f2bab
authored
Feb 01, 2021
by
Jiwon Yoon
Browse files
ppt주문완료까지
parent
b4557a68
Changes
42
Show whitespace changes
Inline
Side-by-side
server/controllers/kakaopay.controller.js
View file @
1e7f2bab
server/controllers/product.controller.js
View file @
1e7f2bab
...
...
@@ -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
per
=
9
;
try
{
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment