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
764c352c
Commit
764c352c
authored
Feb 01, 2021
by
Kim, Subin
Browse files
Merge remote-tracking branch 'origin/jiwon' into ourMaster
parents
cfcaaab5
2e020222
Changes
87
Show whitespace changes
Inline
Side-by-side
data/ppt/pc/user-paymentcompleted.jpg
0 → 100644
View file @
764c352c
252 KB
data/ppt/pc/user-paymentcompleted2.jpg
0 → 100644
View file @
764c352c
279 KB
data/ppt/pc/user-shoppingcart1.jpg
0 → 100644
View file @
764c352c
250 KB
server/config.js
View file @
764c352c
...
@@ -7,12 +7,5 @@ const config = {
...
@@ -7,12 +7,5 @@ const config = {
cookieMaxAge
:
60
*
60
*
24
*
7
*
1000
cookieMaxAge
:
60
*
60
*
24
*
7
*
1000
}
}
// const config = {
export
default
config
// port: 3001,
// kakaoAdminKey: 'b2dda7685c5b2990684d813e362cff07',
// }
\ No newline at end of file
export
default
config
// export default config
\ No newline at end of file
server/controllers/kakaopay.controller.js
View file @
764c352c
server/controllers/order.controller.js
View file @
764c352c
...
@@ -60,7 +60,7 @@ const recommendPro = async (req, res) => {
...
@@ -60,7 +60,7 @@ const recommendPro = async (req, res) => {
'
products.productId
'
:
mongoose
.
Types
.
ObjectId
(
productId
)
'
products.productId
'
:
mongoose
.
Types
.
ObjectId
(
productId
)
}
}
},
},
{
"
$unwind
"
:
"
$products
"
},
{
$unwind
:
"
$products
"
},
{
{
$group
:
{
$group
:
{
_id
:
"
$products.productId
"
,
_id
:
"
$products.productId
"
,
...
...
server/controllers/user.controller.js
View file @
764c352c
...
@@ -84,7 +84,7 @@ const addorder = async (req, res) => {
...
@@ -84,7 +84,7 @@ const addorder = async (req, res) => {
const
order
=
await
Order
.
find
({
userId
:
userId
}).
populate
({
const
order
=
await
Order
.
find
({
userId
:
userId
}).
populate
({
path
:
'
products.productId
'
,
path
:
'
products.productId
'
,
model
:
'
Product
'
model
:
'
Product
'
})
})
.
sort
({
createdAt
:
-
1
})
res
.
status
(
200
).
json
(
order
)
res
.
status
(
200
).
json
(
order
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
...
...
Prev
1
2
3
4
5
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