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()
router
.
route
(
'
/login
'
)
.
post
(
authCtrl
.
login
)
router
.
route
(
'
/logout
'
)
router
.
route
(
'
/logout
'
)
.
get
(
authCtrl
.
logout
)
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';
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
server/schemas/Product.js
View file @
7efc0961
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_im
age
:
{
type
:
Array
,
required
:
true
,
main_im
gUrl
:
{
type
:
String
,
required
:
true
},
detail_image
:
{
type
:
Array
,
required
:
true
,
detail_imgUrls
:
{
type
:
[
String
]
}
},
{
timestamps
:
true
...
...
server/schemas/User.js
View file @
7efc0961
...
...
@@ -16,7 +16,6 @@ const UserSchema = new mongoose.Schema({
type
:
String
,
required
:
true
,
},
number1
:
{
type
:
String
,
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