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
9144f306
Commit
9144f306
authored
Jan 13, 2021
by
이재연
Browse files
zz
parent
df51efcd
Changes
3
Show whitespace changes
Inline
Side-by-side
server/app.js
View file @
9144f306
...
@@ -20,6 +20,8 @@ connectDb()
...
@@ -20,6 +20,8 @@ connectDb()
const
app
=
express
();
const
app
=
express
();
app
.
use
(
express
.
json
());
app
.
use
(
cors
())
app
.
use
(
cors
())
app
.
use
(
express
.
static
(
path
.
join
(
process
.
cwd
(),
'
dist
'
)))
app
.
use
(
express
.
static
(
path
.
join
(
process
.
cwd
(),
'
dist
'
)))
// app.use(bodyParser.urlencoded({ extended: true }))
// app.use(bodyParser.urlencoded({ extended: true }))
...
...
server/controllers/user.controller.js
View file @
9144f306
...
@@ -3,8 +3,10 @@ import isLength from 'validator/lib/isLength.js';
...
@@ -3,8 +3,10 @@ import isLength from 'validator/lib/isLength.js';
import
bcrypt
from
'
bcryptjs
'
;
import
bcrypt
from
'
bcryptjs
'
;
const
signup
=
async
(
req
,
res
)
=>
{
const
signup
=
async
(
req
,
res
)
=>
{
console
.
log
(
req
.
body
)
const
{
name
,
number1
,
number2
,
id
,
password
,
tel
}
=
req
.
body
const
{
name
,
number1
,
number2
,
id
,
password
,
tel
}
=
req
.
body
console
.
log
(
req
.
body
)
try
{
try
{
if
(
!
isLength
(
password
,{
min
:
8
,
max
:
15
})){
if
(
!
isLength
(
password
,{
min
:
8
,
max
:
15
})){
return
res
.
status
(
422
).
send
(
'
비밀번호는 8-15자리로 입력해주세요.
'
)
return
res
.
status
(
422
).
send
(
'
비밀번호는 8-15자리로 입력해주세요.
'
)
...
...
server/routes/auth.routes.js
View file @
9144f306
...
@@ -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
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