summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-05-31 10:00:35 +0200
committerdefault <nobody@localhost>2024-05-31 10:00:35 +0200
commit71c07992314d2457b83afbc3766871972c13d57c (patch)
treea43a9543be42b2b9f070dc77f14e1676ae10b30a /mastoapi.c
parent15bca0921f850aa7922ad12d7da7f2ea45ea3c11 (diff)
mastoapi: more list tweaks.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 0f7b5e4..70a927e 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -2907,6 +2907,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
if (op && id && xs_is_hex(id)) {
if (strcmp(op, "accounts") == 0) {
const xs_list *accts = xs_dict_get(args, "account_ids[]");
+
+ if (xs_is_null(accts))
+ accts = xs_dict_get(args, "account_ids");
+
int c = 0;
const char *v;
@@ -2914,6 +2918,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
list_content(&snac, id, v, 1);
}
+ *ctype = "application/json";
status = HTTP_STATUS_OK;
}
}