fix: throw error if parent is not found, not if it is also found
All checks were successful
create archive with lfs / tag (push) Successful in 9s

This commit is contained in:
dusk 2024-12-16 20:01:42 +03:00
parent a3d79509a3
commit 612fa9228e
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw

View File

@ -52,8 +52,9 @@ export const POST = async ({ request }) => {
if (parentUri !== undefined) {
const parentPost = await bot.getPost(parentUri)
postRef = await parentPost.reply(postPayload)
} else {
throw "a reply was requested but no reply is found"
}
throw "a reply was requested but no reply is found"
} else {
postRef = await bot.post(postPayload)
}