mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
parent
62f26d6630
commit
3be9b13814
@ -30,6 +30,16 @@ exports.handler = function(request,response,state) {
|
|||||||
if(fields.revision) {
|
if(fields.revision) {
|
||||||
delete fields.revision;
|
delete fields.revision;
|
||||||
}
|
}
|
||||||
|
// If this is a skinny tiddler, it means the client never got the full
|
||||||
|
// version of the tiddler to edit. So we must preserve whatever text
|
||||||
|
// already exists on the server, or else we'll inadvertently delete it.
|
||||||
|
if(fields._is_skinny !== undefined) {
|
||||||
|
var tiddler = state.wiki.getTiddler(title);
|
||||||
|
if(tiddler) {
|
||||||
|
fields.text = tiddler.fields.text;
|
||||||
|
}
|
||||||
|
delete fields._is_skinny;
|
||||||
|
}
|
||||||
state.wiki.addTiddler(new $tw.Tiddler(fields,{title: title}));
|
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",{
|
||||||
|
Loading…
Reference in New Issue
Block a user