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
51b78a92
Commit
51b78a92
authored
Jan 25, 2021
by
이재연
Browse files
병합
parent
fdb92c49
Changes
6
Show whitespace changes
Inline
Side-by-side
client/src/Pages/Product.js
View file @
51b78a92
import
axios
from
'
axios
'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'
react
'
;
import
{
Row
,
Col
,
Form
,
Card
,
Button
,
Image
}
from
'
react-bootstrap
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
import
{
Row
,
Col
,
Form
,
Card
,
Button
,
Image
,
Modal
}
from
'
react-bootstrap
'
;
import
{
Redirect
,
useHistory
}
from
'
react-router-dom
'
;
import
catchErrors
from
'
../utils/catchErrors
'
;
...
...
client/src/Pages/ProductsList.js
View file @
51b78a92
...
...
@@ -83,7 +83,6 @@ function ProductsList({ match }) {
const
subname
=
e
.
target
.
name
console
.
log
(
"
subname=
"
,
subname
)
try
{
console
.
log
(
"
first test!!!!!!!!
"
)
const
response
=
await
axios
.
get
(
`/api/product/getproduct/sub/
${
subname
}
`
)
console
.
log
(
"
subname response data=
"
,
response
.
data
)
setProductlist
(
response
.
data
)
...
...
server/controllers/order.controller.js
View file @
51b78a92
...
...
@@ -56,4 +56,4 @@ const orderById = async (req, res, next, id) => {
export
default
{
addorder
,
showorder
,
Ordered
}
export
default
{
addorder
,
showorder
,
Ordered
,
orderById
}
server/routes/auth.routes.js
View file @
51b78a92
...
...
@@ -9,9 +9,4 @@ router.route('/login')
router
.
route
(
'
/logout
'
)
.
get
(
authCtrl
.
logout
)
router
.
route
(
'
/admin/:admin
'
)
.
post
(
authCtrl
.
admin
)
router
.
param
(
'
admin
'
,
authCtrl
.
adminId
)
export
default
router
\ No newline at end of file
server/routes/category.routes.js
View file @
51b78a92
...
...
@@ -6,7 +6,7 @@ const router = express.Router()
router
.
route
(
'
/main
'
)
.
get
(
categoryCtrl
.
getCategory
)
//
router.route('/sub/:sub')
//
.get(categoryCtrl.getSubCategory)
router
.
route
(
'
/sub/:sub
'
)
.
get
(
categoryCtrl
.
getSubCategory
)
export
default
router
\ No newline at end of file
server/routes/product.routes.js
View file @
51b78a92
...
...
@@ -4,9 +4,6 @@ import productCtrl from '../controllers/product.controller.js';
const
router
=
express
.
Router
()
router
.
route
(
'
/sort
'
)
.
get
(
productCtrl
.
Sortlist
)
router
.
route
(
'
/regist
'
)
.
post
(
productCtrl
.
imageUpload
,
productCtrl
.
regist
)
...
...
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