summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar Louis Brauer2024-06-07 00:57:33 +0200
committerGravatar Louis Brauer2024-06-07 01:01:04 +0200
commit3fb0a0acf0921f147e70dbc88e59ebe59d6a9703 (patch)
tree6ad7d8a54239287a8c69b18250b4dfed0a2578bf /mastoapi.c
parentFixed CW dropdown in public instance timeline. (diff)
downloadpenes-snac2-3fb0a0acf0921f147e70dbc88e59ebe59d6a9703.tar.gz
penes-snac2-3fb0a0acf0921f147e70dbc88e59ebe59d6a9703.tar.xz
penes-snac2-3fb0a0acf0921f147e70dbc88e59ebe59d6a9703.zip
mastoapi: fix create list response & duplicate actor adding
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mastoapi.c b/mastoapi.c
index a129ad0..bc86f6d 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1974,7 +1974,7 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1974 d = xs_dict_append(d, "replies_policy", "list"); 1974 d = xs_dict_append(d, "replies_policy", "list");
1975 d = xs_dict_append(d, "exclusive", xs_stock(XSTYPE_FALSE)); 1975 d = xs_dict_append(d, "exclusive", xs_stock(XSTYPE_FALSE));
1976 1976
1977 out = xs_list_append(out, d); 1977 out = xs_dup(d);
1978 break; 1978 break;
1979 } 1979 }
1980 } 1980 }
@@ -2971,8 +2971,10 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
2971 list_content(&snac, id, v, 1); 2971 list_content(&snac, id, v, 1);
2972 } 2972 }
2973 2973
2974 *ctype = "application/json"; 2974 xs *out = xs_dict_new();
2975 status = HTTP_STATUS_OK; 2975 *body = xs_json_dumps(out, 4);
2976 *ctype = "application/json";
2977 status = HTTP_STATUS_OK;
2976 } 2978 }
2977 } 2979 }
2978 } 2980 }