Showing
1 changed file
with
37 additions
and
0 deletions
... | @@ -76,6 +76,43 @@ apiRouter.post('/question3', function(req, res) { | ... | @@ -76,6 +76,43 @@ apiRouter.post('/question3', function(req, res) { |
76 | res.status(200).send(responseBody); | 76 | res.status(200).send(responseBody); |
77 | }); | 77 | }); |
78 | 78 | ||
79 | +apiRouter.post('/Q2', function(req, res) { | ||
80 | + const responseBody = { | ||
81 | + version: "2.0", | ||
82 | + template: { | ||
83 | + outputs: [ | ||
84 | + { | ||
85 | + simpleText: { | ||
86 | + text: '평소 깻잎논쟁에 1시간 이상을 생각해봤다.\n맞다면 N 아니면 S을 입력해주세요.' | ||
87 | + } | ||
88 | + } | ||
89 | + ] | ||
90 | + } | ||
91 | + }; | ||
92 | + | ||
93 | + res.status(200).send(responseBody); | ||
94 | +}); | ||
95 | + | ||
96 | +apiRouter.post('/A2', function(req, res) { | ||
97 | + | ||
98 | + const userRequest = req.body.userRequest; | ||
99 | + const utter = userRequest.utterance; | ||
100 | + | ||
101 | +const responseBody = { | ||
102 | + version: "2.0", | ||
103 | + template: { | ||
104 | + outputs: [ | ||
105 | + { | ||
106 | + simpleText: { | ||
107 | + text: '당신의 MBTI는 *'+utter+'** 입니다.' | ||
108 | + } | ||
109 | + } | ||
110 | + ] | ||
111 | + }} | ||
112 | + | ||
113 | + res.status(200).send(responseBody); | ||
114 | +}); | ||
115 | + | ||
79 | 116 | ||
80 | app.listen((process.env.PORT || 3000), function() { | 117 | app.listen((process.env.PORT || 3000), function() { |
81 | console.log('Example skill server listening on port 3000!'); | 118 | console.log('Example skill server listening on port 3000!'); | ... | ... |
-
Please register or login to post a comment