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-27 15:02:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
29bb83c0755bc99d3745f58b8603d2bfaa907ed8
29bb83c0
1 parent
003c222c
Add block connection
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
12 deletions
app/app.js
app/app.js
View file @
29bb83c
...
...
@@ -34,29 +34,74 @@ apiRouter.post('/sayHello', function(req, res) {
res
.
status
(
200
).
send
(
responseBody
);
});
apiRouter
.
post
(
'/question1'
,
(
req
,
res
)
=>
{
const
responseBody
=
{
apiRouter
.
post
(
'/test'
,
(
req
,
res
)
=>
{
var
utt
=
req
.
body
.
userRequest
.
utterance
;
var
data
=
{
version
:
"2.0"
,
template
:
{
outputs
:
[
{
basicCard
:
{
title
:
"사람들과 어울리는 것을 좋아하나요?"
,
buttons
:
[
simpleText
:
{
text
:
utt
}
}
],
quickReplies
:
[{
action
:
"block"
,
label
:
"테스트 시작"
,
message
:
"테스트 시작"
,
data
:
{
"blockId"
:
"628b8005055a574d7df54466"
,
"extra"
:
{
""
:
""
}
}
}]
}
}
res
.
json
(
data
);
});
app
.
post
(
'/question1'
,
(
req
,
res
)
=>
{
var
mesg
=
req
.
body
.
userRequest
;
console
.
log
(
'[user message] '
,
mesg
);
var
data
=
{
version
:
"2.0"
,
template
:
{
outputs
:
[
{
label
:
'Yes'
,
action
:
'message'
},
{
label
:
'No'
,
action
:
'message'
simpleText
:
{
text
:
'사람들과 어울리는 것을 좋아하시나요?'
}
}
],
quickReplies
:
[
{
action
:
"block"
,
label
:
"네"
,
message
:
"네"
,
data
:
{
"blockId"
:
"628e8cb07bd2fd433357f878"
,
"extra"
:
{
""
:
""
}
}
},
{
action
:
"block"
,
label
:
"아니오"
,
message
:
"아니오"
,
data
:
{
"blockId"
:
"628e8cb07bd2fd433357f878"
,
"extra"
:
{
""
:
""
}
]
}
}
]
}
}
res
.
json
(
responseBody
);
res
.
json
(
data
);
});
apiRouter
.
post
(
'/question3'
,
function
(
req
,
res
)
{
...
...
Please
register
or
login
to post a comment