mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-26 11:53:26 -08:00
Fixed handling of deleting tiddlers over HTTP
This commit is contained in:
parent
bf2fb9cdad
commit
6b78352764
1 changed files with 10 additions and 4 deletions
|
|
@ -74,10 +74,16 @@ console.log("PUT tiddler",title,fields)
|
|||
});
|
||||
break;
|
||||
case "DELETE":
|
||||
console.log("DELETE tiddler",requestPath.substr(1))
|
||||
// self.commander.wiki.deleteTiddler(decodeURIComponent(requestPath.substr(1)));
|
||||
response.writeHead(204, "OK");
|
||||
response.end();
|
||||
var prefix = "/tiddlers/";
|
||||
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.end();
|
||||
} else {
|
||||
response.writeHead(404);
|
||||
response.end();
|
||||
}
|
||||
break;
|
||||
case "GET":
|
||||
if(requestPath === "/") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue