mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-08 09:01:00 +03:00
test
This commit is contained in:
@@ -22,9 +22,10 @@ module.exports.devices = [
|
|||||||
(req, res) => {
|
(req, res) => {
|
||||||
const [reqId, authToken] = [req.get('X-Request-Id'), String(req.get('Authorization')).split(' ')[1]];
|
const [reqId, authToken] = [req.get('X-Request-Id'), String(req.get('Authorization')).split(' ')[1]];
|
||||||
|
|
||||||
//const ltoken = global.authl.findOne({'token': authToken});
|
try {
|
||||||
//const {userId} = ltoken;
|
const ltoken = global.authl.findOne({'token': authToken});
|
||||||
console.log(authToken);
|
const {userId} = ltoken;
|
||||||
|
console.log(userId);
|
||||||
|
|
||||||
const r = {
|
const r = {
|
||||||
request_id: reqId,
|
request_id: reqId,
|
||||||
@@ -39,6 +40,10 @@ module.exports.devices = [
|
|||||||
};
|
};
|
||||||
|
|
||||||
res.status(200).send(r);
|
res.status(200).send(r);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
res.status(404).send(undefined);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user