Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2_open_source_sw_development_Han
/
Jaksimsamil
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
박권수
2020-12-04 11:46:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3b8bdc1339e550f2486c06b0a56c8b412a490d7f
3b8bdc13
1 parent
33a60089
fix syntax : syntax is changed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
jaksimsamil-server/index.js
jaksimsamil-server/src/api/auth/auth.ctrl.js
jaksimsamil-server/src/api/profile/profile.ctrl.js
jaksimsamil-server/index.js
View file @
3b8bdc1
...
...
@@ -28,6 +28,7 @@ mongoose
useNewUrlParser
:
true
,
useFindAndModify
:
false
,
useUnifiedTopology
:
true
,
useCreateIndex
:
true
})
.
then
(()
=>
{
console
.
log
(
"Connected to MongoDB"
);
...
...
jaksimsamil-server/src/api/auth/auth.ctrl.js
View file @
3b8bdc1
...
...
@@ -14,7 +14,7 @@ exports.register = async (ctx) => {
password
:
Joi
.
string
().
required
(),
});
const
result
=
Joi
.
validate
(
ctx
.
request
.
body
,
schema
);
const
result
=
schema
.
validate
(
ctx
.
request
.
body
);
if
(
result
.
error
)
{
ctx
.
status
=
400
;
ctx
.
body
=
result
.
error
;
...
...
jaksimsamil-server/src/api/profile/profile.ctrl.js
View file @
3b8bdc1
...
...
@@ -51,7 +51,7 @@ exports.setProfile = async (ctx) => {
})
.
unknown
();
console
.
log
(
ctx
.
request
.
body
);
const
result
=
Joi
.
validate
(
ctx
.
request
.
body
,
schema
);
const
result
=
schema
.
validate
(
ctx
.
request
.
body
);
if
(
result
.
error
)
{
ctx
.
status
=
400
;
ctx
.
body
=
result
.
error
;
...
...
Please
register
or
login
to post a comment