Commit 51b78a92 authored by 이재연's avatar 이재연
Browse files

병합

parent fdb92c49
import axios from 'axios'; import axios from 'axios';
import React, { useState, useEffect, useRef } from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { Row, Col, Form, Card, Button, Image } from 'react-bootstrap'; import { Row, Col, Form, Card, Button, Image , Modal} from 'react-bootstrap';
import { Redirect } from 'react-router-dom'; import { Redirect, useHistory } from 'react-router-dom';
import catchErrors from '../utils/catchErrors'; import catchErrors from '../utils/catchErrors';
......
...@@ -83,7 +83,6 @@ function ProductsList({ match }) { ...@@ -83,7 +83,6 @@ function ProductsList({ match }) {
const subname = e.target.name const subname = e.target.name
console.log("subname=", subname) console.log("subname=", subname)
try { try {
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)
......
...@@ -56,4 +56,4 @@ const orderById = async (req, res, next, id) => { ...@@ -56,4 +56,4 @@ const orderById = async (req, res, next, id) => {
export default { addorder, showorder, Ordered } export default { addorder, showorder, Ordered, orderById}
...@@ -9,9 +9,4 @@ router.route('/login') ...@@ -9,9 +9,4 @@ router.route('/login')
router.route('/logout') router.route('/logout')
.get(authCtrl.logout) .get(authCtrl.logout)
router.route('/admin/:admin')
.post(authCtrl.admin)
router.param('admin',authCtrl.adminId)
export default router export default router
\ No newline at end of file
...@@ -6,7 +6,7 @@ const router = express.Router() ...@@ -6,7 +6,7 @@ const router = express.Router()
router.route('/main') router.route('/main')
.get(categoryCtrl.getCategory) .get(categoryCtrl.getCategory)
// router.route('/sub/:sub') router.route('/sub/:sub')
// .get(categoryCtrl.getSubCategory) .get(categoryCtrl.getSubCategory)
export default router export default router
\ No newline at end of file
...@@ -4,9 +4,6 @@ import productCtrl from '../controllers/product.controller.js'; ...@@ -4,9 +4,6 @@ import productCtrl from '../controllers/product.controller.js';
const router = express.Router() const router = express.Router()
router.route('/sort')
.get(productCtrl.Sortlist)
router.route('/regist') router.route('/regist')
.post(productCtrl.imageUpload, productCtrl.regist) .post(productCtrl.imageUpload, productCtrl.regist)
......
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