Toggle navigation
Toggle navigation
This project
Loading...
Sign in
윤성배
/
chatbot_for_PsychologicalTest
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Ubuntu
2020-12-09 13:16:01 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b9a671fde9578e575937ea9e6c4d3efad5ba2d03
b9a671fd
1 parent
64d9690a
update
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
7 deletions
app.js
app.js
View file @
b9a671f
...
...
@@ -18,8 +18,6 @@ var ans_sheet="", i, question, answer, contents, result;
app
.
post
(
'/hook'
,
function
(
req
,
res
)
{
var
eventObj
=
req
.
body
.
events
[
0
];
var
message
=
eventObj
.
message
;
ans_sheet
=
"B0=1 B1=1 B2=1 B3=1 B4=1 B5=1 B6=1 B7=1 B8=1 B9=1 B10=1 B11=1 B12=1 B13=1 B14=1 B15=1 B16=1 B17=1 B18=1 B19=1 B20=1 B21=1 B22=1 B23=1 B24=1 B25=1 B26=1 B27="
;
i
=
28
;
console
.
log
(
'======================'
,
new
Date
()
,
'======================'
);
console
.
log
(
'[request]'
,
req
.
body
);
console
.
log
(
'[request source] '
,
eventObj
.
source
);
...
...
@@ -27,7 +25,6 @@ app.post('/hook', function (req, res) {
if
(
message
.
text
==
"시작"
){
i
=
0
;
ans_sheet
=
""
;
console
.
log
(
"====================================="
);
request
.
get
({
url
:
Question_URL
},
function
(
err
,
res
,
body
){
...
...
@@ -57,14 +54,12 @@ app.post('/hook', function (req, res) {
}]
}
},(
error
,
response
,
body
)
=>
{
console
.
log
(
"====================================="
);
i
+=
1
;
});
});
}
else
if
(
message
.
text
==
"1"
||
message
.
text
==
"2"
){
console
.
log
(
"====================================="
);
ans_sheet
+=
message
.
text
+
" "
;
console
.
log
(
ans_sheet
);
if
(
i
==
28
){
...
...
@@ -130,9 +125,7 @@ app.post('/hook', function (req, res) {
}]
}
},(
error
,
response
,
body
)
=>
{
console
.
log
(
"====================================="
);
i
+=
1
;
});
});
}
...
...
Please
register
or
login
to post a comment