1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Fix overwriting of modification fields when PUTting a tiddler #6075 (#6084)

* call self.displayError

* Revert "call self.displayError"

This reverts commit 5d599aa979.

* fix PUT bug with created/modified fields
This commit is contained in:
Joshua Fontany 2021-10-27 03:15:30 -07:00 committed by GitHub
parent 4d87ef4231
commit 2a73505508
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ exports.handler = function(request,response,state) {
if(fields.revision) { if(fields.revision) {
delete fields.revision; delete fields.revision;
} }
state.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title},state.wiki.getModificationFields())); state.wiki.addTiddler(new $tw.Tiddler(fields,{title: title}));
var changeCount = state.wiki.getChangeCount(title).toString(); var changeCount = state.wiki.getChangeCount(title).toString();
response.writeHead(204, "OK",{ response.writeHead(204, "OK",{
Etag: "\"default/" + encodeURIComponent(title) + "/" + changeCount + ":\"", Etag: "\"default/" + encodeURIComponent(title) + "/" + changeCount + ":\"",