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-05 21:33:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d2f5a5e1d2f8380a01249e6013bb60eb25ec42a3
d2f5a5e1
1 parent
74297c60
fixing error for display each function
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
app.js
app.js
View file @
d2f5a5e
var
express
=
require
(
"express"
);
var
app
=
express
();
var
cheerio
=
require
(
'cheerio'
);
const
line
=
require
(
'@line/bot-sdk'
);
var
request
=
require
(
'request'
);
var
https
=
require
(
'https'
);
...
...
@@ -181,7 +182,6 @@ function handleEvent(event) {
}
else
if
(
event
.
message
.
text
.
indexOf
(
'http'
)
!=-
1
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
var
cheerio
=
require
(
'cheerio'
);
var
uriBase
=
'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'
;
var
imageUrl
=
event
.
message
.
text
;
var
options
=
{
...
...
@@ -237,6 +237,7 @@ function handleEvent(event) {
});
});
}
else
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
//언어 감지 option
var
detect_options
=
{
...
...
@@ -298,6 +299,8 @@ function handleEvent(event) {
});
});
}
}
app
.
get
(
'/'
,(
req
,
res
)
=>
{
res
.
send
(
"hello
w
"
);
res
.
send
(
"hello"
);
})
\ No newline at end of file
...
...
Please
register
or
login
to post a comment