1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 02:50:27 +00:00

Show affected filepaths on the server

Preparatory to doing file sync on the server
This commit is contained in:
Jeremy Ruston 2013-03-23 22:43:39 +00:00
parent b574436dff
commit 638ed6429c

View File

@ -124,7 +124,9 @@ var Command = function(params,commander,callback) {
if(fields["revision"]) {
delete fields["revision"];
}
console.log("PUT tiddler",title,fields)
var fileInfo = $tw.boot.files[title],
filepath = fileInfo ? fileInfo.filepath : null;
console.log("PUT tiddler",title,filepath,fields)
state.wiki.addTiddler(new $tw.Tiddler(fields,{title: title}));
var changeCount = state.wiki.getChangeCount(title).toString();
response.writeHead(204, "OK",{
@ -138,7 +140,9 @@ console.log("PUT tiddler",title,fields)
path: /^\/bags\/default\/tiddlers\/(.+)$/,
handler: function(request,response,state) {
var title = decodeURIComponent(state.params[0]);
console.log("DELETE tiddler",title)
var fileInfo = $tw.boot.files[title],
filepath = fileInfo ? fileInfo.filepath : null;
console.log("DELETE tiddler",title,filepath)
state.wiki.deleteTiddler(title);
response.writeHead(204, "OK");
response.end();