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:33:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a23000a15cb412d23d5eea4784491fa051175e8e
a23000a1
1 parent
3c32910d
new3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
app.js
app.js
View file @
a23000a
...
...
@@ -25,32 +25,17 @@ app.post('/hook', function (req, res) {
console
.
log
(
'[request]'
,
req
.
body
);
console
.
log
(
'[request source] '
,
eventObj
.
source
);
console
.
log
(
'[request message]'
,
eventObj
.
message
);
const
readline
=
require
(
'readline'
);
const
rl
=
readline
.
createInterface
({
input
:
process
.
stdin
,
output
:
process
.
stdout
});
rl
.
on
(
'line'
,
function
(
line
)
{
console
.
log
(
line
);
if
(
line
==
"영어"
){
if
(
request
.
get
==
"영어"
){
transen
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
else
if
(
line
==
"프랑스어"
){
else
if
(
request
.
get
==
"프랑스어"
){
transfr
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
else
if
(
line
==
"일본어"
){
else
if
(
request
.
get
==
"일본어"
){
transja
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
rl
.
close
();
}).
on
(
"close"
,
function
()
{
process
.
exit
();
});
res
.
sendStatus
(
200
);
});
...
...
Please
register
or
login
to post a comment