mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-07 08:40:29 +03:00
test
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
module.exports = {
|
||||
yandex: {
|
||||
skillId: 'skill_id',
|
||||
token: 'token'
|
||||
},
|
||||
|
||||
mqtt: {
|
||||
host: 'localhost',
|
||||
port: 1883,
|
||||
|
@@ -20,7 +20,12 @@ module.exports.ping = [
|
||||
module.exports.devices = [
|
||||
passport.authenticate('bearer', {session: true}),
|
||||
(req, res) => {
|
||||
const reqId = req.get('X-Request-Id');
|
||||
const [reqId, authToken] = [req.get('X-Request-Id'), req.get('Authorization')];
|
||||
|
||||
const ltoken = global.authl.findOne({'token': authToken});
|
||||
const {userId} = ltoken;
|
||||
console.log(userId);
|
||||
|
||||
const r = {
|
||||
request_id: reqId,
|
||||
payload: {
|
||||
|
Reference in New Issue
Block a user