This commit is contained in:
Evgenii Abramov
2021-03-30 19:31:42 +03:00
parent e7d63fc126
commit 4e4bc36201
2 changed files with 6 additions and 6 deletions

View File

@@ -1,9 +1,4 @@
module.exports = { module.exports = {
yandex: {
skillId: 'skill_id',
token: 'token'
},
mqtt: { mqtt: {
host: 'localhost', host: 'localhost',
port: 1883, port: 1883,

View File

@@ -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: {