공정훈

Add question16, 17

...@@ -81,7 +81,7 @@ apiRouter.post('/question15', (req, res) => { ...@@ -81,7 +81,7 @@ apiRouter.post('/question15', (req, res) => {
81 outputs: [ 81 outputs: [
82 { 82 {
83 simpleText: { 83 simpleText: {
84 - text: '친구: 우울해서 아이패드 샀어' 84 + text: '[Question 15/20]\n친구: 우울해서 아이패드 샀어'
85 } 85 }
86 } 86 }
87 ], 87 ],
...@@ -104,6 +104,82 @@ apiRouter.post('/question15', (req, res) => { ...@@ -104,6 +104,82 @@ apiRouter.post('/question15', (req, res) => {
104 res.status(200).send(responseBody); 104 res.status(200).send(responseBody);
105 }); 105 });
106 106
107 +apiRouter.post('/question16', (req, res) => {
108 + var userId = req.body.userRequest.user.id;
109 + var mesg = req.body.userRequest;
110 + var mbti = '';
111 + if (mesg == "왜ㅠㅠ무슨일 있었어?") {
112 + mbti = 'F';
113 + } else if (mesg == "어떤 기종샀어?") {
114 + mbti = 'T';
115 + }
116 + const responseBody = {
117 + version: "2.0",
118 + template: {
119 + outputs: [
120 + {
121 + simpleText: {
122 + text: '[Question 16/20]\n이메일에 가능한 빨리 회신하려고 하고 지저분한 편지함을 참을 수 없다.'
123 + }
124 + }
125 + ],
126 + quickReplies: [
127 + {
128 + action: "block",
129 + label: "네",
130 + message: "네",
131 + blockId: "6294c4755ceed96c38542a53"
132 + },
133 + {
134 + action: "block",
135 + label: "아니오",
136 + message: "아니오",
137 + blockId: "6294c4755ceed96c38542a53"
138 + }
139 + ]
140 + }
141 + }
142 + res.status(200).send(responseBody);
143 +});
144 +
145 +apiRouter.post('/question17', (req, res) => {
146 + var userId = req.body.userRequest.user.id;
147 + var mesg = req.body.userRequest;
148 + var mbti = '';
149 + if (mesg == "네") {
150 + mbti = 'J';
151 + } else if (mesg == "아니오") {
152 + mbti = 'P';
153 + }
154 + const responseBody = {
155 + version: "2.0",
156 + template: {
157 + outputs: [
158 + {
159 + simpleText: {
160 + text: '[Question 17/20]\n당일에 갑자기 잡히는 약속이 부담스럽다.'
161 + }
162 + }
163 + ],
164 + quickReplies: [
165 + {
166 + action: "block",
167 + label: "네",
168 + message: "네",
169 + blockId: "6294c4aff591aa1905548236"
170 + },
171 + {
172 + action: "block",
173 + label: "아니오",
174 + message: "아니오",
175 + blockId: "6294c4aff591aa1905548236"
176 + }
177 + ]
178 + }
179 + }
180 + res.status(200).send(responseBody);
181 +});
182 +
107 apiRouter.post('/result', (req, res) => { 183 apiRouter.post('/result', (req, res) => {
108 var userId = req.body.userRequest.user.id; 184 var userId = req.body.userRequest.user.id;
109 var mesg = req.body.userRequest.utterance; 185 var mesg = req.body.userRequest.utterance;
......