Browse Source

fix JSON request to always send arrays

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

+ 6
- 0
views/new-post.php View File

@ -700,6 +700,12 @@ $(function(){
}
request.send(formData);
} else {
// Convert all single-value properties to arrays
for(var k in entry) {
if(typeof entry[k] == "string") {
entry[k] = [entry[k]];
}
}
$.post("/micropub/postjson", {
data: JSON.stringify({
"type": ["h-entry"],

Loading…
Cancel
Save