Browse Source

mastoapi: return an empty /v1/trends/statuses.

default 10 months ago
parent
commit
c80a30e228
1 changed files with 6 additions and 0 deletions
  1. 6 0
      mastoapi.c

+ 6 - 0
mastoapi.c

@@ -2265,6 +2265,12 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
         status = HTTP_STATUS_OK;
     }
     else
+    if (strcmp(cmd, "/v1/trends/statuses") == 0) { /** **/
+        *body  = xs_dup("[]");
+        *ctype = "application/json";
+        status = HTTP_STATUS_OK;
+    }
+    else
     if (strcmp(cmd, "/v2/search") == 0) { /** **/
         if (logged_in) {
             const char *q      = xs_dict_get(args, "q");