Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박찬수
/
enjoy_soccer
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
박찬수
2022-06-08 23:23:38 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6be82499497a62d0e38d52a8968278d2f18a9b22
6be82499
1 parent
5d68837b
reply.js modified.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
27 deletions
reply.js
reply.js
View file @
6be8249
...
...
@@ -9,13 +9,14 @@ const HTTPS = require('https');
const
domain
=
"2018102191.osschatbot2022.tk"
const
sslport
=
23023
;
var
soccer
=
require
(
'./soccer
.js'
);
var
data
=
require
(
'./getid
.js'
);
const
bodyParser
=
require
(
'body-parser'
);
const
{
EventEmitter
}
=
require
(
'stream'
);
data
.
SetData
();
var
app
=
express
();
app
.
use
(
bodyParser
.
json
());
app
.
post
(
'/hook'
,
function
(
req
,
res
)
{
var
eventObj
=
req
.
body
.
events
[
0
];
...
...
@@ -30,31 +31,7 @@ app.post('/hook', function (req, res) {
console
.
log
(
"Receive Message : "
,
eventObj
.
message
.
text
);
GetPlayerInfo
(
276
,
2019
,
eventObj
);
// request.post(
// {
// url: TARGET_URL,
// headers: {
// 'Authorization': `Bearer ${TOKEN}` // 인증정보 : channel token 값을 통해 인증.
// },
// json: {
// "replyToken":eventObj.replyToken, // reply token : 누구한테 보낼 것인지?를 판별하기 위해!
// "messages":[
// {
// "type":"text",
// "text":"Hello, user"
// },
// {
// "type":"text",
// "text":"May I help you?"
// }
// ]
// }
// },(error, response, body) => {
// console.log(body);
// });
res
.
sendStatus
(
200
);
});
...
...
Please
register
or
login
to post a comment