summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2024-03-12 07:03:44 +0100
committerGravatar default2024-03-12 07:03:44 +0100
commit05fc062cb3e1b65641641c1ec9e88e08f6849dcd (patch)
treee0c5fe256b739686a51fb49f7e0ecc0a5a54bd1a /mastoapi.c
parentUpdated dependencies. (diff)
downloadsnac2-05fc062cb3e1b65641641c1ec9e88e08f6849dcd.tar.gz
snac2-05fc062cb3e1b65641641c1ec9e88e08f6849dcd.tar.xz
snac2-05fc062cb3e1b65641641c1ec9e88e08f6849dcd.zip
Some formatting tweaks.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 416f96c..e14fc47 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -359,9 +359,9 @@ int oauth_post_handler(const xs_dict *req, const char *q_path,
359 } 359 }
360 } 360 }
361 361
362 /* no code? 362 /* no code?
363 I'm not sure of the impacts of this right now, but Subway Tooter does not 363 I'm not sure of the impacts of this right now, but Subway Tooter does not
364 provide a code so one must be generated */ 364 provide a code so one must be generated */
365 if (xs_is_null(code)){ 365 if (xs_is_null(code)){
366 code = random_str(); 366 code = random_str();
367 } 367 }
@@ -1716,8 +1716,8 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1716 else 1716 else
1717 if (strcmp(cmd, "/v2/filters") == 0) { /** **/ 1717 if (strcmp(cmd, "/v2/filters") == 0) { /** **/
1718 /* snac will never have filters 1718 /* snac will never have filters
1719 * but still, without a v2 endpoint a short delay is introduced 1719 * but still, without a v2 endpoint a short delay is introduced
1720 * in some apps */ 1720 * in some apps */
1721 *body = xs_dup("[]"); 1721 *body = xs_dup("[]");
1722 *ctype = "application/json"; 1722 *ctype = "application/json";
1723 status = 200; 1723 status = 200;
@@ -2115,7 +2115,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
2115 } 2115 }
2116 else if (i_ctype && xs_startswith(i_ctype, "application/x-www-form-urlencoded")) 2116 else if (i_ctype && xs_startswith(i_ctype, "application/x-www-form-urlencoded"))
2117 { 2117 {
2118 // Some apps send form data instead of json so we should cater for those 2118 // Some apps send form data instead of json so we should cater for those
2119 if (!xs_is_null(payload)) { 2119 if (!xs_is_null(payload)) {
2120 xs *upl = xs_url_dec(payload); 2120 xs *upl = xs_url_dec(payload);
2121 args = xs_url_vars(upl); 2121 args = xs_url_vars(upl);