明树Git Lab

Commit 6a3ec579 authored by zfp1's avatar zfp1

update

parent 398d0b7d
Pipeline #103861 passed with stage
in 3 seconds
......@@ -226,12 +226,19 @@ async function listResourceAll(req, res, next) {
{
model: DB.ResourcesInfo,
as: 'resourcesInfos',
attributes: ['key', 'value']
}
]
}
)
return res.sendData(datas)
let obj = {};
for (let index = 0; index < datas.length; index++) {
const element = datas[index];
if(element.type == 2) {
element.resourcesInfos = utils.buildTree(element.resourcesInfos);
}
obj[element.key] = element.resourcesInfos || [];
}
return res.sendData(obj)
} catch (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