Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정민우
/
vps_service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정민우
2021-05-13 18:19:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b7d1d59c0f16ca29c72d0220a1c15cddd3585c99
b7d1d59c
1 parent
f542616f
[Edit] User Register Requirekey 추가
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
backend/controllers/userController.js
backend/controllers/userController.js
View file @
b7d1d59
...
...
@@ -9,6 +9,12 @@ const Op = Sequelize.Op
exports
.
userRegister
=
async
(
req
,
res
)
=>
{
try
{
const
requiredKey
=
[
'userId'
,
'password'
,
'name'
,
'phone'
,
'email'
]
const
required
=
checkRequiredExist
(
req
.
body
,
requiredKey
)
if
(
required
)
{
logging
(
'user'
,
'error'
,
{
code
:
400
,
message
:
`missingKey:
${
required
}
`
},
req
)
return
sendError
(
res
,
400
,
`missingKey:
${
required
}
`
)
}
let
registerData
=
setValues
(
req
.
body
,
[
'userId'
,
'password'
,
'name'
,
'phone'
,
'email'
])
if
(
typeof
registerData
.
password
!==
'undefined'
&&
registerData
.
password
!==
null
)
{
...
...
Please
register
or
login
to post a comment