Update createRepost() function to return original post
This commit is contained in:
parent
c74edb5228
commit
f1d08380c8
1 changed files with 4 additions and 1 deletions
|
@ -224,7 +224,10 @@ export async function createRepost(
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
throw new Error(data.message)
|
throw new Error(data.message)
|
||||||
}
|
}
|
||||||
return data
|
if (data.reblog === null) {
|
||||||
|
throw new Error("reblog property is null")
|
||||||
|
}
|
||||||
|
return data.reblog
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteRepost(
|
export async function deleteRepost(
|
||||||
|
|
Loading…
Reference in a new issue