fixed error when retrieving private replies in timeline

This commit is contained in:
ari melody 2024-07-05 15:03:30 +01:00
parent 0d39ddd3d2
commit d1d3b16cbf
Signed by: ari
GPG key ID: CF99829C92678188

View file

@ -192,7 +192,9 @@ export async function getPost(host, token, post_id) {
const data = await fetch(url, { const data = await fetch(url, {
method: 'GET', method: 'GET',
headers: { "Authorization": token ? `Bearer ${token}` : null } headers: { "Authorization": token ? `Bearer ${token}` : null }
}).then(res => res.json()); }).then(res => res.json())
if (!data || data.error) return false;
return data; return data;
} }