Browse Source

fix JSON syntax on note form

pull/82/head
Aaron Parecki 7 years ago
parent
commit
985642236c
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      views/new-post.php

+ 4
- 4
views/new-post.php View File

@ -598,15 +598,15 @@ $(function(){
if(v=$("#note_content").val()) { if(v=$("#note_content").val()) {
formData.append("content", v); formData.append("content", v);
entry['content'] = v;
entry['content'] = [v];
} }
if(v=$("#note_in_reply_to").val()) { if(v=$("#note_in_reply_to").val()) {
formData.append("in-reply-to", v); formData.append("in-reply-to", v);
entry['in-reply-to'] = v;
entry['in-reply-to'] = [v];
} }
if(v=$("#note_location").val()) { if(v=$("#note_location").val()) {
formData.append("location", v); formData.append("location", v);
entry['location'] = v;
entry['location'] = [v];
} }
if(category.length > 0) { if(category.length > 0) {
for(var i in category) { for(var i in category) {
@ -673,7 +673,7 @@ $(function(){
} else { } else {
$.post("/micropub/postjson", { $.post("/micropub/postjson", {
data: JSON.stringify({ data: JSON.stringify({
"type": "h-entry",
"type": ["h-entry"],
"properties": entry "properties": entry
}) })
}, function(response) { }, function(response) {

Loading…
Cancel
Save