Toggle navigation
Toggle navigation
This project
Loading...
Sign in
kkl
/
Probability Death
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-05-27 22:04:24 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f28a97acaa0a14d9a8bcc27c1d34d819079d220a
f28a97ac
1 parent
a8b96700
socketio.js 들여쓰기 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
lib/socketio.js
lib/socketio.js
View file @
f28a97a
...
...
@@ -31,17 +31,17 @@ module.exports = (server, app) => {
url
:
`https://api2.sktelecom.com/weather/
${
when
}
/
${
what
}
?appKey=
${
secret_key
}
&lat=
${
lat
}
&lon=
${
lon
}
`
,
json
:
true
},
//api에게 응답 받았을때 실행되는 callback function
function
(
err
,
api_res
,
api_body
)
{
//err 존재시 promise reject 호출
if
(
err
)
reject
(
err
);
// api의 response이 있을경우 promise resolve 호출
if
(
api_res
)
{
console
.
log
(
"calling api"
);
resolve
(
api_body
);
}
});
//api에게 응답 받았을때 실행되는 callback function
function
(
err
,
api_res
,
api_body
)
{
//err 존재시 promise reject 호출
if
(
err
)
reject
(
err
);
// api의 response이 있을경우 promise resolve 호출
if
(
api_res
)
{
console
.
log
(
"calling api"
);
resolve
(
api_body
);
}
});
})
}
...
...
Please
register
or
login
to post a comment