Browse Source

In /relationship, the id[] can be a list.

default 1 year ago
parent
commit
2a073116d3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      mastoapi.c

+ 3 - 0
mastoapi.c

@@ -931,6 +931,9 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
             const char *md5 = xs_dict_get(args, "id[]");
 
             if (!xs_is_null(md5)) {
+                if (xs_type(md5) == XSTYPE_LIST)
+                    md5 = xs_list_get(md5, 0);
+
                 xs *rel = mastoapi_relationship(&snac1, md5);
 
                 if (rel != NULL)