New support: fixes
This commit is contained in:
parent
9692659a05
commit
dacb91e81c
2 changed files with 8 additions and 1 deletions
|
@ -11,6 +11,11 @@ const Util = require("../common-util");
|
|||
Moderators.getAll = (Env, cb) => {
|
||||
Moderator.getAll(Env, (err, data) => {
|
||||
if (err) { return void cb(err); }
|
||||
let res = {};
|
||||
Object.keys(data).forEach(safeKey => {
|
||||
const unsafeKey = Util.unescapeKeyCharacters(safeKey);
|
||||
res[unsafeKey] = data[safeKey];
|
||||
});
|
||||
cb(null, data);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -543,7 +543,9 @@ var makeRouteCache = function (template, cacheName) {
|
|||
}
|
||||
|
||||
// successive calls to this function
|
||||
cleanUp[cacheKey]();
|
||||
if (typeof (cleanUp[cacheKey]) === "function") {
|
||||
cleanUp[cacheKey]();
|
||||
}
|
||||
return void res.send(cache[cacheKey]);
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue