Toggle navigation
Toggle navigation
This project
Loading...
Sign in
공정훈
/
find_mbti_bot
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
Ubuntu
2022-06-03 10:49:11 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9e11f3816188f8fb8c1e028f1604be6c03035777
9e11f381
1 parent
2711181c
Fix app.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
app/app.js
app/app.js
View file @
9e11f38
...
...
@@ -201,7 +201,7 @@ apiRouter.post('/question4', (req, res) => {
apiRouter
.
post
(
'/question5'
,
(
req
,
res
)
=>
{
var
userId
=
req
.
body
.
userRequest
.
user
.
id
;
var
mesg
=
req
.
body
.
userRequest
;
var
mesg
=
req
.
body
.
userRequest
.
utterance
;
console
.
log
(
'[q1:user message] '
,
mesg
);
var
mbti
=
''
;
if
(
mesg
==
"네"
)
{
...
...
@@ -332,7 +332,7 @@ apiRouter.post('/question8', (req, res) => {
}
else
if
(
mesg
==
"아니오"
)
{
mbti
=
'F'
;
}
userDB
[
userId
][
1
]
+=
mbti
;
userDB
[
userId
][
2
]
+=
mbti
;
console
.
log
(
userDB
[
userId
]);
const
responseBody
=
{
version
:
"2.0"
,
...
...
@@ -374,7 +374,7 @@ apiRouter.post('/question8', (req, res) => {
mbti
=
'J'
;
}
userDB
[
userId
][
3
]
+=
mbti
;
console
.
log
(
userDB
);
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -415,7 +415,7 @@ apiRouter.post('/question8', (req, res) => {
mbti
=
'E'
;
}
userDB
[
userId
][
0
]
+=
mbti
;
console
.
log
(
userDB
);
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -456,7 +456,7 @@ apiRouter.post('/question8', (req, res) => {
mbti
=
'N'
;
}
userDB
[
userId
][
1
]
+=
mbti
;
console
.
log
(
userDB
);
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -497,7 +497,7 @@ apiRouter.post('/question8', (req, res) => {
mbti
=
'T'
;
}
userDB
[
userId
][
2
]
+=
mbti
;
console
.
log
(
userDB
);
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -538,7 +538,7 @@ apiRouter.post('/question8', (req, res) => {
mbti
=
'P'
;
}
userDB
[
userId
][
3
]
+=
mbti
;
console
.
log
(
userDB
);
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -579,7 +579,7 @@ apiRouter.post('/question8', (req, res) => {
mbti
=
'E'
;
}
userDB
[
userId
][
0
]
+=
mbti
;
console
.
log
(
userDB
);
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -619,8 +619,8 @@ apiRouter.post('/question8', (req, res) => {
else
if
(
mesg
==
"아니오"
)
{
mbti
=
'S'
;
}
userDB
[
userId
][
0
]
+=
mbti
;
console
.
log
(
userDB
);
userDB
[
userId
][
1
]
+=
mbti
;
console
.
log
(
userDB
[
userId
]
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
...
...
@@ -988,7 +988,7 @@ function analysis_mbti(userdb) {
function
count_mbti
(
item_list
,
mbti_ch
)
{
var
result
=
0
;
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
if
(
item_list
[
i
]
==
'mbti_ch'
){
if
(
item_list
[
i
]
==
mbti_ch
){
result
+=
1
;
}
}
...
...
Please
register
or
login
to post a comment