diff options
| author | 2024-05-31 10:00:35 +0200 | |
|---|---|---|
| committer | 2024-05-31 10:00:35 +0200 | |
| commit | 71c07992314d2457b83afbc3766871972c13d57c (patch) | |
| tree | a43a9543be42b2b9f070dc77f14e1676ae10b30a /mastoapi.c | |
| parent | mastoapi: some tweaks to list entry points. (diff) | |
| download | snac2-71c07992314d2457b83afbc3766871972c13d57c.tar.gz snac2-71c07992314d2457b83afbc3766871972c13d57c.tar.xz snac2-71c07992314d2457b83afbc3766871972c13d57c.zip | |
mastoapi: more list tweaks.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -2907,6 +2907,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 2907 | if (op && id && xs_is_hex(id)) { | 2907 | if (op && id && xs_is_hex(id)) { |
| 2908 | if (strcmp(op, "accounts") == 0) { | 2908 | if (strcmp(op, "accounts") == 0) { |
| 2909 | const xs_list *accts = xs_dict_get(args, "account_ids[]"); | 2909 | const xs_list *accts = xs_dict_get(args, "account_ids[]"); |
| 2910 | |||
| 2911 | if (xs_is_null(accts)) | ||
| 2912 | accts = xs_dict_get(args, "account_ids"); | ||
| 2913 | |||
| 2910 | int c = 0; | 2914 | int c = 0; |
| 2911 | const char *v; | 2915 | const char *v; |
| 2912 | 2916 | ||
| @@ -2914,6 +2918,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, | |||
| 2914 | list_content(&snac, id, v, 1); | 2918 | list_content(&snac, id, v, 1); |
| 2915 | } | 2919 | } |
| 2916 | 2920 | ||
| 2921 | *ctype = "application/json"; | ||
| 2917 | status = HTTP_STATUS_OK; | 2922 | status = HTTP_STATUS_OK; |
| 2918 | } | 2923 | } |
| 2919 | } | 2924 | } |