mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 08:14:50 +00:00
Fixed handling of deleting tiddlers over HTTP
This commit is contained in:
parent
bf2fb9cdad
commit
6b78352764
@ -74,10 +74,16 @@ console.log("PUT tiddler",title,fields)
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "DELETE":
|
case "DELETE":
|
||||||
console.log("DELETE tiddler",requestPath.substr(1))
|
var prefix = "/tiddlers/";
|
||||||
// self.commander.wiki.deleteTiddler(decodeURIComponent(requestPath.substr(1)));
|
if(requestPath.indexOf(prefix) === 0) {
|
||||||
|
console.log("DELETE tiddler",requestPath.substr(prefix.length))
|
||||||
|
// self.commander.wiki.deleteTiddler(decodeURIComponent(requestPath.substr(prefix.length)));
|
||||||
response.writeHead(204, "OK");
|
response.writeHead(204, "OK");
|
||||||
response.end();
|
response.end();
|
||||||
|
} else {
|
||||||
|
response.writeHead(404);
|
||||||
|
response.end();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "GET":
|
case "GET":
|
||||||
if(requestPath === "/") {
|
if(requestPath === "/") {
|
||||||
|
Loading…
Reference in New Issue
Block a user