Browse Source
fix JSON request to always send arrays
pull/82/head
Aaron Parecki
7 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
1 changed files with
6 additions and
0 deletions
-
views/new-post.php
|
|
@ -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"], |
|
|
|