Commit 7efc0961 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

Merge remote-tracking branch 'origin/jaeyeon' into jiwon

parents 7953e3c1 aa87bd28
......@@ -6,7 +6,7 @@ const router = express.Router()
router.route('/login')
.post(authCtrl.login)
router.route('/logout')
router.route('/logout')
.get(authCtrl.logout)
export default router
\ No newline at end of file
......@@ -5,8 +5,11 @@ import productCtrl from '../controllers/product.controller.js';
const router = express.Router()
router.route('/regist')
.post(productCtrl.fileUpload, productCtrl.regist)
router.route('/productone')
.get(productCtrl.getProduct)
.post(productCtrl.imageUpload, productCtrl.regist)
router.route('/getproduct/:category')
.get(productCtrl.getlist)
router.param('category', productCtrl.categoryId)
export default router
\ No newline at end of file
import mongoose from 'mongoose'
const { String} = mongoose.Schema.Types
const { String, Number } = mongoose.Schema.Types
const ProductSchema = new mongoose.Schema({
pro_name: {
......@@ -33,20 +33,19 @@ const ProductSchema = new mongoose.Schema({
required: true,
},
sub_category: {
type: Array,
type: [String],
required: true,
},
description: {
type: String,
required: true,
},
main_image: {
type: Array,
required: true,
main_imgUrl: {
type: String,
required: true
},
detail_image: {
type: Array,
required: true,
detail_imgUrls: {
type: [String]
}
}, {
timestamps: true
......
......@@ -16,7 +16,6 @@ const UserSchema = new mongoose.Schema({
type: String,
required: true,
},
number1: {
type: String,
required: true,
......
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