summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-08-13 12:09:35 +0200
committerdefault <nobody@localhost>2023-08-13 12:09:35 +0200
commita0906208ea3906b3820307aa4bfe811b8d2eadb6 (patch)
treee5cf16535586b3e197cb72141009b620f5ab0fc5 /mastoapi.c
parent5bec358fa0f7d6652e732878567936752c26a827 (diff)
Use some new xs_stock values.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/mastoapi.c b/mastoapi.c
index b6a0e49..99e78ea 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1462,19 +1462,16 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
ins = xs_dict_append(ins, "email", v);
- xs *l1 = xs_list_new();
- ins = xs_dict_append(ins, "rules", l1);
+ ins = xs_dict_append(ins, "rules", xs_stock_list);
- l1 = xs_list_append(l1, "en");
+ xs *l1 = xs_list_append(xs_list_new(), "en");
ins = xs_dict_append(ins, "languages", l1);
- xs *d1 = xs_dict_new();
- ins = xs_dict_append(ins, "urls", d1);
+ ins = xs_dict_append(ins, "urls", xs_stock_dict);
- xs *z = xs_number_new(0);
- xs *d2 = xs_dict_append(xs_dict_new(), "user_count", z);
- d2 = xs_dict_append(d2, "status_count", z);
- d2 = xs_dict_append(d2, "domain_count", z);
+ xs *d2 = xs_dict_append(xs_dict_new(), "user_count", xs_stock_0);
+ d2 = xs_dict_append(d2, "status_count", xs_stock_0);
+ d2 = xs_dict_append(d2, "domain_count", xs_stock_0);
ins = xs_dict_append(ins, "stats", d2);
ins = xs_dict_append(ins, "registrations", xs_stock_false);