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
7efc0961
Commit
7efc0961
authored
Jan 13, 2021
by
Jiwon Yoon
Browse files
Merge remote-tracking branch 'origin/jaeyeon' into jiwon
parents
7953e3c1
aa87bd28
Changes
25
Show whitespace changes
Inline
Side-by-side
server/controllers/user.controller.js
View file @
7efc0961
server/routes/auth.routes.js
View file @
7efc0961
...
@@ -6,7 +6,7 @@ const router = express.Router()
...
@@ -6,7 +6,7 @@ const router = express.Router()
router
.
route
(
'
/login
'
)
router
.
route
(
'
/login
'
)
.
post
(
authCtrl
.
login
)
.
post
(
authCtrl
.
login
)
router
.
route
(
'
/logout
'
)
router
.
route
(
'
/logout
'
)
.
get
(
authCtrl
.
logout
)
.
get
(
authCtrl
.
logout
)
export
default
router
export
default
router
\ No newline at end of file
server/routes/product.routes.js
View file @
7efc0961
...
@@ -5,8 +5,11 @@ import productCtrl from '../controllers/product.controller.js';
...
@@ -5,8 +5,11 @@ import productCtrl from '../controllers/product.controller.js';
const
router
=
express
.
Router
()
const
router
=
express
.
Router
()
router
.
route
(
'
/regist
'
)
router
.
route
(
'
/regist
'
)
.
post
(
productCtrl
.
fileUpload
,
productCtrl
.
regist
)
.
post
(
productCtrl
.
imageUpload
,
productCtrl
.
regist
)
router
.
route
(
'
/productone
'
)
.
get
(
productCtrl
.
getProduct
)
router
.
route
(
'
/getproduct/:category
'
)
.
get
(
productCtrl
.
getlist
)
router
.
param
(
'
category
'
,
productCtrl
.
categoryId
)
export
default
router
export
default
router
\ No newline at end of file
server/schemas/Product.js
View file @
7efc0961
import
mongoose
from
'
mongoose
'
import
mongoose
from
'
mongoose
'
const
{
String
}
=
mongoose
.
Schema
.
Types
const
{
String
,
Number
}
=
mongoose
.
Schema
.
Types
const
ProductSchema
=
new
mongoose
.
Schema
({
const
ProductSchema
=
new
mongoose
.
Schema
({
pro_name
:
{
pro_name
:
{
...
@@ -33,20 +33,19 @@ const ProductSchema = new mongoose.Schema({
...
@@ -33,20 +33,19 @@ const ProductSchema = new mongoose.Schema({
required
:
true
,
required
:
true
,
},
},
sub_category
:
{
sub_category
:
{
type
:
Array
,
type
:
[
String
]
,
required
:
true
,
required
:
true
,
},
},
description
:
{
description
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
main_im
age
:
{
main_im
gUrl
:
{
type
:
Array
,
type
:
String
,
required
:
true
,
required
:
true
},
},
detail_image
:
{
detail_imgUrls
:
{
type
:
Array
,
type
:
[
String
]
required
:
true
,
}
}
},
{
},
{
timestamps
:
true
timestamps
:
true
...
...
server/schemas/User.js
View file @
7efc0961
...
@@ -16,7 +16,6 @@ const UserSchema = new mongoose.Schema({
...
@@ -16,7 +16,6 @@ const UserSchema = new mongoose.Schema({
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
number1
:
{
number1
:
{
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
...
...
Prev
1
2
Next
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