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-02 14:57:18 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4dabc0a92bbebf20c8f2810249feef113f8855cd
4dabc0a9
1 parent
8c8d9dbc
Update app.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
app.js
app.js
View file @
4dabc0a
...
...
@@ -54,7 +54,7 @@ const client = new line.Client(config);
// register a webhook handler with middleware
// about the middleware, please refer to doc
/*
app
.
post
(
'/webhook'
,
line
.
middleware
(
config
),
(
req
,
res
)
=>
{
console
.
log
(
res
.
statusCode
);
Promise
...
...
@@ -76,7 +76,7 @@ function handleEvent(event) {
headers
:
{
'X-Naver-Client-Id'
:
client_id
,
'X-Naver-Client-Secret'
:
client_secret
}
};
//papago 언어 감지
request.post(detect_options,
function(error,response,body)
{
request
.
post
(
detect_options
,
async
(
error
,
response
,
body
)
=>
{
console
.
log
(
response
.
statusCode
);
if
(
!
error
&&
response
.
statusCode
==
200
){
var
detect_body
=
JSON
.
parse
(
response
.
body
);
...
...
@@ -101,7 +101,7 @@ function handleEvent(event) {
};
// Naver Post API
request.post(options, function(error, response, body){
await
request
.
post
(
options
,
function
(
error
,
response
,
body
){
// Translate API Sucess
if
(
!
error
&&
response
.
statusCode
==
200
){
// JSON
...
...
@@ -131,8 +131,3 @@ function handleEvent(event) {
});
}
*/
app
.
get
(
'/'
,(
req
,
res
)
=>
{
res
.
send
(
"hellow world"
);
})
\ No newline at end of file
...
...
Please
register
or
login
to post a comment