Simply Function, Add Searching Function, Add User Setting(part)
Showing
3 changed files
with
8 additions
and
14 deletions
... | @@ -41,5 +41,5 @@ exports.all_ids[302] = 'PLfVO1GXBPp3ubihJVPi6HSltRIuvSqSI1' | ... | @@ -41,5 +41,5 @@ exports.all_ids[302] = 'PLfVO1GXBPp3ubihJVPi6HSltRIuvSqSI1' |
41 | exports.all_ids[303] = 'PLfVO1GXBPp3u0ckIfYZkADGlSQ6LQoAIQ' | 41 | exports.all_ids[303] = 'PLfVO1GXBPp3u0ckIfYZkADGlSQ6LQoAIQ' |
42 | exports.all_ids[304] = 'PLfVO1GXBPp3vo3sivJPfFzREBECRFepVK' | 42 | exports.all_ids[304] = 'PLfVO1GXBPp3vo3sivJPfFzREBECRFepVK' |
43 | 43 | ||
44 | -exports.all_ids[501] = ['p5iu1V30myk', 'i-SBnhaZSSU', 'Etfgb6A7hSI', 'IN2mml9xs_s', | ||
45 | - 'tp1uoFAfgHE', 'Qx22TnVVIfU', '3y1QIqR115A', 'VXBI1wt8XII', 'aWMBn2--E0Q', 'HyTbgBlnLCo']; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
44 | +//exports.all_ids[501] = ['p5iu1V30myk', 'i-SBnhaZSSU', 'Etfgb6A7hSI', 'IN2mml9xs_s', | ||
45 | +// 'tp1uoFAfgHE', 'Qx22TnVVIfU', '3y1QIqR115A', 'VXBI1wt8XII', 'aWMBn2--E0Q', 'HyTbgBlnLCo']; | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -6,17 +6,11 @@ const HTTPS = require('https'); | ... | @@ -6,17 +6,11 @@ const HTTPS = require('https'); |
6 | const domain = "2020105631.oss2021.tk" | 6 | const domain = "2020105631.oss2021.tk" |
7 | const sslport = 23023; | 7 | const sslport = 23023; |
8 | const bodyParser = require('body-parser'); | 8 | const bodyParser = require('body-parser'); |
9 | -const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'; | 9 | +const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' |
10 | -// var Info = require('./Info'); | ||
11 | var app = express(); | 10 | var app = express(); |
12 | app.use(bodyParser.json()); | 11 | app.use(bodyParser.json()); |
13 | -<<<<<<< HEAD | ||
14 | - | ||
15 | -var sad = require('./video_sad'); | ||
16 | - | ||
17 | -======= | ||
18 | var songs = require('./check'); | 12 | var songs = require('./check'); |
19 | ->>>>>>> feature/YouTube_API | 13 | +var thumbnail = 1;// 썸네일 출력 여부 (1:출력/0:미출력/기본값:1) |
20 | 14 | ||
21 | 15 | ||
22 | app.post('/hook', function (req, res) { | 16 | app.post('/hook', function (req, res) { |
... | @@ -26,10 +20,11 @@ app.post('/hook', function (req, res) { | ... | @@ -26,10 +20,11 @@ app.post('/hook', function (req, res) { |
26 | 20 | ||
27 | // request log | 21 | // request log |
28 | console.log('======================', new Date(), '======================'); | 22 | console.log('======================', new Date(), '======================'); |
29 | - send(eventObj.replyToken, message.text); | 23 | + |
24 | + send(eventObj.replyToken, message.text,eventObj.source.userId); | ||
30 | res.sendStatus(200); | 25 | res.sendStatus(200); |
31 | }); | 26 | }); |
32 | -function send(replyToken, message) { | 27 | +function send(replyToken, message,userId) { |
33 | 28 | ||
34 | request.post( | 29 | request.post( |
35 | { | 30 | { |
... | @@ -37,8 +32,7 @@ function send(replyToken, message) { | ... | @@ -37,8 +32,7 @@ function send(replyToken, message) { |
37 | }, | 32 | }, |
38 | 33 | ||
39 | function () { | 34 | function () { |
40 | - songs.check(message, replyToken); | 35 | + songs.check(message, replyToken,userId); |
41 | - | ||
42 | } | 36 | } |
43 | ); | 37 | ); |
44 | } | 38 | } | ... | ... |
-
Please register or login to post a comment