Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김대욱
/
trans
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
김대욱
2020-11-27 19:51:02 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3d1ddd7e44666b45f9189823dfe44974aa27fb14
3d1ddd7e
1 parent
a23000a1
wish
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
app.js
app.js
View file @
3d1ddd7
...
...
@@ -17,7 +17,6 @@ app.post('/hook', function (req, res) {
var
eventObj
=
req
.
body
.
events
[
0
];
var
source
=
eventObj
.
source
;
var
kind
=
eventObj
.
kind
;
var
message
=
eventObj
.
message
;
// request log
...
...
@@ -25,14 +24,16 @@ app.post('/hook', function (req, res) {
console
.
log
(
'[request]'
,
req
.
body
);
console
.
log
(
'[request source] '
,
eventObj
.
source
);
console
.
log
(
'[request message]'
,
eventObj
.
message
);
if
(
request
.
get
==
"영어"
){
const
question
=
req
.
body
.
userRequest
.
utterance
;
if
(
question
==
"영어"
){
transen
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
else
if
(
request
.
get
==
"프랑스어"
){
else
if
(
question
==
"프랑스어"
){
transfr
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
else
if
(
request
.
get
==
"일본어"
){
else
if
(
question
==
"일본어"
){
transja
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
...
...
Please
register
or
login
to post a comment