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 21:56:55 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c16d1b7e477fd651be683d908fcd0404e6ee4b73
c16d1b7e
1 parent
319c4253
fix. auth error
Show 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 @
c16d1b7
...
...
@@ -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
:
''
,
authTypeCd
:
socialType
.
toUpperCase
(),
useYn
:
'Y'
,
});
...
...
Please
register
or
login
to post a comment