明树Git Lab

Commit 3555033f authored by zengfanpei's avatar zengfanpei

update

parent 15de365c
...@@ -99,7 +99,12 @@ async function test(req, res, next) { ...@@ -99,7 +99,12 @@ async function test(req, res, next) {
// 获取硬件所有可以设置的属性 // 获取硬件所有可以设置的属性
async function listAttribute(req, res, next) { async function listAttribute(req, res, next) {
try { try {
let list = await DB.CollectAttribute.find({del:0, enable: true}); let search = {del:0, enable: true};
if(req.body.deviceHQType) {
search.deviceHQType = req.body.deviceHQType
}
let list = await DB.CollectAttribute.find(search).lean().exec();
res.sendData(list); res.sendData(list);
} catch (error) { } catch (error) {
next(error); next(error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment