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

병합

parent fdb92c49
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';
......
......@@ -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)
......
......@@ -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')
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
......@@ -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
......@@ -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)
......
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