Browse Source

shepherd groom delete upd

all-modes
pbca26 8 years ago
parent
commit
48d6651573
  1. 2
      gui/init.js
  2. 6
      routes/shepherd.js

2
gui/init.js

@ -38,4 +38,4 @@ $(document).ready(function() {
}
sartcheck();
});
});

6
routes/shepherd.js

@ -119,7 +119,7 @@ shepherd.get('/cache', function(req, res, next) {
res.end(JSON.stringify(errorObj));
} else {
var parsedJSON = 'JSON parse error';
try {
parsedJSON = JSON.parse(data);
} catch (e) {
@ -201,11 +201,11 @@ shepherd.get('/groom', function(req, res, next) {
* params: filename
*/
shepherd.delete('/groom', function(req, res, next) {
var _filename = req.query.filename;
var _filename = req.body.filename;
if (_filename) {
if (fs.existsSync(iguanaDir + '/shepherd/cache-' + _filename + '.json')) {
fs.unlink(kmdDebugLogLocation, function(err) {
fs.unlink(iguanaDir + '/shepherd/cache-' + _filename + '.json', function(err) {
if (err) {
var errorObj = {
'msg': 'error',

Loading…
Cancel
Save