From 4f0eabbd5526472427e33f179d277690427b2831 Mon Sep 17 00:00:00 2001 From: Sol Fisher Romanoff Date: Thu, 23 Jun 2022 15:02:43 +0300 Subject: [PATCH] api: turn MASTODON_USER_URL into a function --- src/services/api/api.service.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index dee5e111..b9be5eb0 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -47,7 +47,7 @@ const MASTODON_PUBLIC_TIMELINE = '/api/v1/timelines/public' const MASTODON_USER_HOME_TIMELINE_URL = '/api/v1/timelines/home' const MASTODON_STATUS_URL = id => `/api/v1/statuses/${id}` const MASTODON_STATUS_CONTEXT_URL = id => `/api/v1/statuses/${id}/context` -const MASTODON_USER_URL = '/api/v1/accounts' +const MASTODON_USER_URL = id => `/api/v1/accounts/${id}?with_relationships=true` const MASTODON_USER_RELATIONSHIPS_URL = '/api/v1/accounts/relationships' const MASTODON_USER_TIMELINE_URL = id => `/api/v1/accounts/${id}/statuses` const MASTODON_LIST_URL = id => `/api/v1/lists/${id}` @@ -311,7 +311,7 @@ const denyUser = ({ id, credentials }) => { } const fetchUser = ({ id, credentials }) => { - let url = `${MASTODON_USER_URL}/${id}` + '?with_relationships=true' + const url = MASTODON_USER_URL(id) return promisedRequest({ url, credentials }) .then((data) => parseUser(data)) }