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
공정훈
2022-05-30 23:22:10 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0c8679b8e7c39554368a446d5275edfcaa98cacc
0c8679b8
1 parent
3208ce6e
Add question16, 17
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
1 deletions
app/app.js
app/app.js
View file @
0c8679b
...
...
@@ -81,7 +81,7 @@ apiRouter.post('/question15', (req, res) => {
outputs
:
[
{
simpleText
:
{
text
:
'친구: 우울해서 아이패드 샀어'
text
:
'
[Question 15/20]\n
친구: 우울해서 아이패드 샀어'
}
}
],
...
...
@@ -104,6 +104,82 @@ apiRouter.post('/question15', (req, res) => {
res
.
status
(
200
).
send
(
responseBody
);
});
apiRouter
.
post
(
'/question16'
,
(
req
,
res
)
=>
{
var
userId
=
req
.
body
.
userRequest
.
user
.
id
;
var
mesg
=
req
.
body
.
userRequest
;
var
mbti
=
''
;
if
(
mesg
==
"왜ㅠㅠ무슨일 있었어?"
)
{
mbti
=
'F'
;
}
else
if
(
mesg
==
"어떤 기종샀어?"
)
{
mbti
=
'T'
;
}
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
outputs
:
[
{
simpleText
:
{
text
:
'[Question 16/20]\n이메일에 가능한 빨리 회신하려고 하고 지저분한 편지함을 참을 수 없다.'
}
}
],
quickReplies
:
[
{
action
:
"block"
,
label
:
"네"
,
message
:
"네"
,
blockId
:
"6294c4755ceed96c38542a53"
},
{
action
:
"block"
,
label
:
"아니오"
,
message
:
"아니오"
,
blockId
:
"6294c4755ceed96c38542a53"
}
]
}
}
res
.
status
(
200
).
send
(
responseBody
);
});
apiRouter
.
post
(
'/question17'
,
(
req
,
res
)
=>
{
var
userId
=
req
.
body
.
userRequest
.
user
.
id
;
var
mesg
=
req
.
body
.
userRequest
;
var
mbti
=
''
;
if
(
mesg
==
"네"
)
{
mbti
=
'J'
;
}
else
if
(
mesg
==
"아니오"
)
{
mbti
=
'P'
;
}
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
outputs
:
[
{
simpleText
:
{
text
:
'[Question 17/20]\n당일에 갑자기 잡히는 약속이 부담스럽다.'
}
}
],
quickReplies
:
[
{
action
:
"block"
,
label
:
"네"
,
message
:
"네"
,
blockId
:
"6294c4aff591aa1905548236"
},
{
action
:
"block"
,
label
:
"아니오"
,
message
:
"아니오"
,
blockId
:
"6294c4aff591aa1905548236"
}
]
}
}
res
.
status
(
200
).
send
(
responseBody
);
});
apiRouter
.
post
(
'/result'
,
(
req
,
res
)
=>
{
var
userId
=
req
.
body
.
userRequest
.
user
.
id
;
var
mesg
=
req
.
body
.
userRequest
.
utterance
;
...
...
Please
register
or
login
to post a comment