Authored by yyq

Merge branch 'hotfix/riskManage'

... ... @@ -33,6 +33,8 @@ const risk = {
var key = ctx.request.query.key;
var oldRet = '';
key = key.replace(/\s+/g, '+');
if (key) {
var app = key.split('/')[0];
var path = formatPath(app);
... ... @@ -41,7 +43,7 @@ const risk = {
if (oldRet) {
oldRet = JSON.parse(oldRet);
}
data = _.find(oldRet, function(o) {
return `${o.app}/${o.route}` === key;
});
... ... @@ -167,7 +169,7 @@ const risk = {
});
let result = await zookeeperModel.setPath(path, JSON.stringify(oldRet));
if (result) {
ctx.body = {
... ... @@ -193,4 +195,4 @@ r.post('/setter', risk.setter);
r.post('/edit', risk.edit);
r.post('/remove', risk.remove);
module.exports = r;
\ No newline at end of file
module.exports = r;
... ...