mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-07 16:50:30 +03:00
test
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
yandex: {
|
|
||||||
skillId: 'skill_id',
|
|
||||||
token: 'token'
|
|
||||||
},
|
|
||||||
|
|
||||||
mqtt: {
|
mqtt: {
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
port: 1883,
|
port: 1883,
|
||||||
|
@@ -20,7 +20,12 @@ module.exports.ping = [
|
|||||||
module.exports.devices = [
|
module.exports.devices = [
|
||||||
passport.authenticate('bearer', {session: true}),
|
passport.authenticate('bearer', {session: true}),
|
||||||
(req, res) => {
|
(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 = {
|
const r = {
|
||||||
request_id: reqId,
|
request_id: reqId,
|
||||||
payload: {
|
payload: {
|
||||||
|
Reference in New Issue
Block a user