mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Relationships can only be queried if logged in.
This commit is contained in:
parent
bb61b04e66
commit
ec48b8ef8c
@ -679,11 +679,14 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
|||||||
else
|
else
|
||||||
if (strcmp(cmd, "/accounts/relationships") == 0) {
|
if (strcmp(cmd, "/accounts/relationships") == 0) {
|
||||||
/* find if an account is followed, blocked, etc. */
|
/* find if an account is followed, blocked, etc. */
|
||||||
|
/* the account to get relationships about is in args "id[]" */
|
||||||
/* dummy by now */
|
/* dummy by now */
|
||||||
|
if (logged_in) {
|
||||||
*body = xs_dup("[]");
|
*body = xs_dup("[]");
|
||||||
*ctype = "application/json";
|
*ctype = "application/json";
|
||||||
status = 200;
|
status = 200;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
if (xs_startswith(cmd, "/accounts/")) {
|
if (xs_startswith(cmd, "/accounts/")) {
|
||||||
/* account-related information */
|
/* account-related information */
|
||||||
|
Loading…
Reference in New Issue
Block a user