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 20:47:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ee7f86445c373362ceec1ececa53a1e9fafc1e83
ee7f8644
1 parent
f5442bee
오늘은 여기까지
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
app.js
app.js
View file @
ee7f864
...
...
@@ -14,12 +14,6 @@ const bodyParser = require('body-parser');
var
app
=
express
();
app
.
use
(
bodyParser
.
json
());
app
.
get
(
'/hook'
,
function
(
req
,
res
)
{
var
eventObj
=
req
.
body
.
events
[
0
];
var
message
=
eventObj
.
message
;
var
cmd
=
message
.
text
;
});
app
.
post
(
'/hook'
,
function
(
req
,
res
)
{
var
eventObj
=
req
.
body
.
events
[
0
];
...
...
@@ -32,6 +26,8 @@ app.post('/hook', function (req, res) {
console
.
log
(
'[request source] '
,
eventObj
.
source
);
console
.
log
(
'[request message]'
,
eventObj
.
message
);
var
cmd
=
message
.
text
;
if
(
cmd
==
"영어"
){
transen
(
eventObj
.
replyToken
,
eventObj
.
message
.
text
);
}
...
...
Please
register
or
login
to post a comment