Toggle navigation
Toggle navigation
This project
Loading...
Sign in
은승우
/
LINEBOT
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
권은령
2019-12-04 13:18:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7295dede6670aabbc3dd9953cedf977f79e3665b
7295dede
1 parent
233e7278
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
app.js
app.js
View file @
7295ded
...
...
@@ -29,7 +29,7 @@ const lex = greenlock .create({
opts.agreeTos = true;
}
cb(null, { options: opts, certs });
},
renewWithin: 81 * 24 * 60 * 60 * 1000,
renewBy: 80 * 24 * 60 * 60 * 1000,
...
...
@@ -63,24 +63,23 @@ const client = new line.Client(config);
// about the middleware, please refer to doc
// Creates a client
/* google-api
var vision = require('google-vision-api-client');
var requtil = vision.requtil;
//Prepare your service account from trust preview certificated project
var jsonfile = '/home/ubuntu/a/LINEBOT/googlevisionapikey.json';
//Initialize the api
vision.init(jsonfile);
//Build the request payloads
var d = requtil.createRequests().addRequest(
requtil.createRequest('/home/ubuntu/a/LINEBOT/photo/Fancy-TWICE.jpg')
...
...
@@ -92,9 +91,7 @@ if(e) console.log('ERROR:', e);
console.log(JSON.stringify(d));
});
*/
app
.
post
(
'/webhook'
,
line
.
middleware
(
config
),
(
req
,
res
)
=>
{
...
...
@@ -142,7 +139,7 @@ function handleEvent(event) {
headers
:
{
'X-Naver-Client-Id'
:
client_id
,
'X-Naver-Client-Secret'
:
client_secret
}
};
// Naver Post API
console
.
log
(
"?!"
);
request
.
post
(
options
,
function
(
error
,
response
,
body
){
...
...
@@ -175,4 +172,3 @@ function handleEvent(event) {
});
}
...
...
Please
register
or
login
to post a comment