unreblogStatusController: repostedEvent -> repostEvent

This commit is contained in:
Alex Gleason 2024-05-22 12:08:20 -05:00
parent 6d1c21dce2
commit 1d37106b27
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 3 additions and 3 deletions

View File

@ -296,17 +296,17 @@ const unreblogStatusController: AppController = async (c) => {
return c.json({ error: 'Record not found' }, 404);
}
const [repostedEvent] = await store.query(
const [repostEvent] = await store.query(
[{ kinds: [6], authors: [pubkey], '#e': [event.id], limit: 1 }],
);
if (!repostedEvent) {
if (!repostEvent) {
return c.json({ error: 'Record not found' }, 404);
}
await createEvent({
kind: 5,
tags: [['e', repostedEvent.id]],
tags: [['e', repostEvent.id]],
}, c);
return c.json(await renderStatus(event, { viewerPubkey: pubkey }));