엄성진

Simply Function, Add Searching Function, Add User Setting(part)

......@@ -41,5 +41,5 @@ exports.all_ids[302] = 'PLfVO1GXBPp3ubihJVPi6HSltRIuvSqSI1'
exports.all_ids[303] = 'PLfVO1GXBPp3u0ckIfYZkADGlSQ6LQoAIQ'
exports.all_ids[304] = 'PLfVO1GXBPp3vo3sivJPfFzREBECRFepVK'
exports.all_ids[501] = ['p5iu1V30myk', 'i-SBnhaZSSU', 'Etfgb6A7hSI', 'IN2mml9xs_s',
'tp1uoFAfgHE', 'Qx22TnVVIfU', '3y1QIqR115A', 'VXBI1wt8XII', 'aWMBn2--E0Q', 'HyTbgBlnLCo'];
\ No newline at end of file
//exports.all_ids[501] = ['p5iu1V30myk', 'i-SBnhaZSSU', 'Etfgb6A7hSI', 'IN2mml9xs_s',
// 'tp1uoFAfgHE', 'Qx22TnVVIfU', '3y1QIqR115A', 'VXBI1wt8XII', 'aWMBn2--E0Q', 'HyTbgBlnLCo'];
\ No newline at end of file
......
This diff is collapsed. Click to expand it.
......@@ -6,17 +6,11 @@ const HTTPS = require('https');
const domain = "2020105631.oss2021.tk"
const sslport = 23023;
const bodyParser = require('body-parser');
const TARGET_URL = 'https://api.line.me/v2/bot/message/reply';
// var Info = require('./Info');
const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
var app = express();
app.use(bodyParser.json());
<<<<<<< HEAD
var sad = require('./video_sad');
=======
var songs = require('./check');
>>>>>>> feature/YouTube_API
var thumbnail = 1;// 썸네일 출력 여부 (1:출력/0:미출력/기본값:1)
app.post('/hook', function (req, res) {
......@@ -26,10 +20,11 @@ app.post('/hook', function (req, res) {
// request log
console.log('======================', new Date(), '======================');
send(eventObj.replyToken, message.text);
send(eventObj.replyToken, message.text,eventObj.source.userId);
res.sendStatus(200);
});
function send(replyToken, message) {
function send(replyToken, message,userId) {
request.post(
{
......@@ -37,8 +32,7 @@ function send(replyToken, message) {
},
function () {
songs.check(message, replyToken);
songs.check(message, replyToken,userId);
}
);
}
......