fixed error when retrieving private replies in timeline
This commit is contained in:
parent
0d39ddd3d2
commit
d1d3b16cbf
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -358,4 +360,4 @@ export async function getUser(host, token, user_id) {
|
||||||
}).then(res => res.json());
|
}).then(res => res.json());
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue