Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-10-04 22:11:38 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
af71d7e1454fa4e3e56025bbbf8095f0f8f39b23
af71d7e1
2 parents
5492f415
b6415e29
Merge branch 'server' into web
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
server/src/api/auth/auth.ctrl.js
server/src/api/auth/auth.ctrl.js
View file @
af71d7e
...
...
@@ -27,6 +27,7 @@ exports.register = async(ctx) => {
userNm
:
Joi
.
string
().
required
(),
birth
:
Joi
.
string
().
required
(),
contact
:
Joi
.
string
().
required
(),
deviceToken
:
Joi
.
string
(),
});
const
result
=
schema
.
validate
(
ctx
.
request
.
body
);
...
...
@@ -200,8 +201,9 @@ exports.login = async(ctx) => {
const
schema
=
Joi
.
object
().
keys
({
userId
:
Joi
.
string
().
email
().
max
(
50
).
required
(),
password
:
Joi
.
string
().
required
()
})
password
:
Joi
.
string
().
required
(),
deviceToken
:
Joi
.
string
(),
});
const
result
=
schema
.
validate
(
ctx
.
request
.
body
);
if
(
result
.
error
)
{
...
...
@@ -333,7 +335,7 @@ exports.socialRegister = async ctx => {
const
user
=
new
User
({
userId
,
hashedPassword
:
null
,
hashedPassword
:
'unnecessary'
,
authTypeCd
:
socialType
.
toUpperCase
(),
useYn
:
'Y'
,
});
...
...
Please
register
or
login
to post a comment