1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Fix inclusion of revision field when getting a tiddler

This commit is contained in:
Jeremy Ruston 2013-03-17 19:25:59 +00:00
parent 2624fed4f1
commit d19fa16ca6

View File

@ -181,7 +181,7 @@ console.log("DELETE tiddler",title)
tiddlerFields[name] = tiddler.getFieldString(name); tiddlerFields[name] = tiddler.getFieldString(name);
} }
}); });
tiddlerFields["revision"] = $tw.wiki.getChangeCount(title); tiddlerFields["revision"] = state.wiki.getChangeCount(title);
tiddlers.push(tiddlerFields); tiddlers.push(tiddlerFields);
}); });
var text = JSON.stringify(tiddlers); var text = JSON.stringify(tiddlers);
@ -208,6 +208,7 @@ console.log("DELETE tiddler",title)
tiddlerFields.fields[name] = value; tiddlerFields.fields[name] = value;
} }
}); });
tiddlerFields["revision"] = state.wiki.getChangeCount(title);
response.writeHead(200, {"Content-Type": "application/json"}); response.writeHead(200, {"Content-Type": "application/json"});
response.end(JSON.stringify(tiddlerFields),"utf8"); response.end(JSON.stringify(tiddlerFields),"utf8");
} else { } else {