diff options
| author | 2023-04-23 15:37:09 +0200 | |
|---|---|---|
| committer | 2023-04-23 15:37:09 +0200 | |
| commit | 997b17d854db1709686df85fe8dedae0a20ca5fa (patch) | |
| tree | 0f8399c1789f47d1138b1a072400b2491911e47a /mastoapi.c | |
| parent | Fixed bad JSON for accounts that do not have a 'summary' field. (diff) | |
| download | snac2-997b17d854db1709686df85fe8dedae0a20ca5fa.tar.gz snac2-997b17d854db1709686df85fe8dedae0a20ca5fa.tar.xz snac2-997b17d854db1709686df85fe8dedae0a20ca5fa.zip | |
Moved JSON output validation to httpd.c.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 8 |
1 files changed, 0 insertions, 8 deletions
| @@ -900,14 +900,6 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, | |||
| 900 | *ctype = "application/json"; | 900 | *ctype = "application/json"; |
| 901 | status = 200; | 901 | status = 200; |
| 902 | 902 | ||
| 903 | { | ||
| 904 | xs *j = xs_json_loads(*body); | ||
| 905 | if (j == NULL) { | ||
| 906 | srv_log(xs_fmt("mastoapi timeline: bad JSON")); | ||
| 907 | srv_archive_error("mastoapi_timeline", "bad JSON", req, *body); | ||
| 908 | } | ||
| 909 | } | ||
| 910 | |||
| 911 | srv_debug(2, xs_fmt("mastoapi timeline: returned %d entries", xs_list_len(out))); | 903 | srv_debug(2, xs_fmt("mastoapi timeline: returned %d entries", xs_list_len(out))); |
| 912 | } | 904 | } |
| 913 | else { | 905 | else { |