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, {
method: 'GET',
headers: { "Authorization": token ? `Bearer ${token}` : null }
}).then(res => res.json());
}).then(res => res.json())
if (!data || data.error) return false;
return data;
}
@ -358,4 +360,4 @@ export async function getUser(host, token, user_id) {
}).then(res => res.json());
return data;
}
}