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
520cf554
Commit
520cf554
authored
Jan 25, 2021
by
kusang96
Browse files
상호 병합 성공
parent
26f7898a
Changes
2
Hide whitespace changes
Inline
Side-by-side
client/src/Pages/ProductsList.js
View file @
520cf554
...
@@ -86,7 +86,7 @@ function ProductsList({ match }) {
...
@@ -86,7 +86,7 @@ function ProductsList({ match }) {
console
.
log
(
"
first test!!!!!!!!
"
)
console
.
log
(
"
first test!!!!!!!!
"
)
const
response
=
await
axios
.
get
(
`/api/product/getproduct/sub/
${
subname
}
`
)
const
response
=
await
axios
.
get
(
`/api/product/getproduct/sub/
${
subname
}
`
)
console
.
log
(
"
subname response data=
"
,
response
.
data
)
console
.
log
(
"
subname response data=
"
,
response
.
data
)
setProductlist
(
[
response
.
data
]
)
setProductlist
(
response
.
data
)
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
"
error22
"
)
console
.
log
(
"
error22
"
)
}
}
...
...
server/controllers/product.controller.js
View file @
520cf554
...
@@ -87,7 +87,7 @@ const categoryId = async (req, res, next, category) => {
...
@@ -87,7 +87,7 @@ const categoryId = async (req, res, next, category) => {
const
subcategoryId
=
async
(
req
,
res
,
next
,
subname
)
=>
{
const
subcategoryId
=
async
(
req
,
res
,
next
,
subname
)
=>
{
try
{
try
{
console
.
log
(
"
Please===>>>
"
,
subname
)
console
.
log
(
"
Please===>>>
"
,
subname
)
const
findSubname
=
await
Product
.
find
One
({
sub_category
:
subname
})
const
findSubname
=
await
Product
.
find
({
sub_category
:
subname
})
console
.
log
(
"
findSubname111=
"
,
findSubname
)
console
.
log
(
"
findSubname111=
"
,
findSubname
)
if
(
!
findSubname
)
{
if
(
!
findSubname
)
{
...
...
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