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
Minkyung Ko
2022-06-02 01:55:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9eff66c7c1f790b8ddd8fd317a3f222284a11c4e
9eff66c7
1 parent
233e28b2
Add question11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletions
app/app.js
app/app.js
View file @
9eff66c
...
...
@@ -22,7 +22,7 @@ apiRouter.post('/test', (req, res) => {
outputs
:
[
{
simpleText
:
{
text
:
'MBTI 테스트 question8-14'
text
:
'MBTI 테스트 question8-14
\n시작하려면 시작하기 버튼을 눌러주세요!
'
}
}
],
...
...
@@ -160,6 +160,47 @@ apiRouter.post('/question10', (req, res) => {
res
.
status
(
200
).
send
(
responseBody
);
});
apiRouter
.
post
(
'/question11'
,
(
req
,
res
)
=>
{
var
mesg
=
req
.
body
.
userRequest
.
utterance
;
var
userId
=
req
.
body
.
userRequest
.
user
.
id
;
var
mbti
=
''
;
if
(
mesg
==
"네"
){
mbti
=
'S'
;
}
else
if
(
mesg
==
"아니오"
)
{
mbti
=
'N'
;
}
userDB
[
userId
][
1
]
+=
mbti
;
console
.
log
(
userDB
);
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
outputs
:
[
{
simpleText
:
{
text
:
'[question11]\n팀플을 하는 경우, 충실하지만 실적을 못 내는 팀원을 제명하기 어려워합니다.'
}
}
],
quickReplies
:
[
{
action
:
"block"
,
label
:
"네"
,
message
:
"네"
,
blockId
:
"6297810fe7a0253c7662cca8"
},
{
action
:
"block"
,
label
:
"아니오"
,
message
:
"아니오"
,
blockId
:
"6297810fe7a0253c7662cca8"
}
]
}
}
res
.
status
(
200
).
send
(
responseBody
);
});
app
.
listen
((
process
.
env
.
PORT
||
3000
),
function
()
{
console
.
log
(
'Example skill server listening on port 3000!'
);
});
\ No newline at end of file
...
...
Please
register
or
login
to post a comment