summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 7413afa..be477c3 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -243,9 +243,6 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
243 const char *i_ctype = xs_dict_get(req, "content-type"); 243 const char *i_ctype = xs_dict_get(req, "content-type");
244 xs *args = NULL; 244 xs *args = NULL;
245 245
246 if (i_ctype == NULL)
247 return 0;
248
249 if (i_ctype && xs_startswith(i_ctype, "application/json")) { 246 if (i_ctype && xs_startswith(i_ctype, "application/json")) {
250 if (!xs_is_null(payload)) 247 if (!xs_is_null(payload))
251 args = xs_json_loads(payload); 248 args = xs_json_loads(payload);
@@ -2415,9 +2412,6 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
2415 xs *args = NULL; 2412 xs *args = NULL;
2416 const char *i_ctype = xs_dict_get(req, "content-type"); 2413 const char *i_ctype = xs_dict_get(req, "content-type");
2417 2414
2418 if (i_ctype == NULL)
2419 return 0;
2420
2421 if (i_ctype && xs_startswith(i_ctype, "application/json")) { 2415 if (i_ctype && xs_startswith(i_ctype, "application/json")) {
2422 if (!xs_is_null(payload)) 2416 if (!xs_is_null(payload))
2423 args = xs_json_loads(payload); 2417 args = xs_json_loads(payload);
@@ -3098,9 +3092,6 @@ int mastoapi_put_handler(const xs_dict *req, const char *q_path,
3098 xs *args = NULL; 3092 xs *args = NULL;
3099 const char *i_ctype = xs_dict_get(req, "content-type"); 3093 const char *i_ctype = xs_dict_get(req, "content-type");
3100 3094
3101 if (i_ctype == NULL)
3102 return 0;
3103
3104 if (i_ctype && xs_startswith(i_ctype, "application/json")) { 3095 if (i_ctype && xs_startswith(i_ctype, "application/json")) {
3105 if (!xs_is_null(payload)) 3096 if (!xs_is_null(payload))
3106 args = xs_json_loads(payload); 3097 args = xs_json_loads(payload);
@@ -3248,9 +3239,6 @@ int mastoapi_patch_handler(const xs_dict *req, const char *q_path,
3248 xs *args = NULL; 3239 xs *args = NULL;
3249 const char *i_ctype = xs_dict_get(req, "content-type"); 3240 const char *i_ctype = xs_dict_get(req, "content-type");
3250 3241
3251 if (i_ctype == NULL)
3252 return 0;
3253
3254 if (i_ctype && xs_startswith(i_ctype, "application/json")) { 3242 if (i_ctype && xs_startswith(i_ctype, "application/json")) {
3255 if (!xs_is_null(payload)) 3243 if (!xs_is_null(payload))
3256 args = xs_json_loads(payload); 3244 args = xs_json_loads(payload);