statusController: remove unnecessary "as Event"

This commit is contained in:
Alex Gleason 2023-08-17 14:57:46 -05:00
parent 4f37a1b9f8
commit 4f9b5c1431
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { type AppController } from '@/app.ts'; import { type AppController } from '@/app.ts';
import { publish } from '@/client.ts'; import { publish } from '@/client.ts';
import { type Event, ISO6391, Kind, z } from '@/deps.ts'; import { ISO6391, Kind, z } from '@/deps.ts';
import { getAncestors, getDescendants, getEvent } from '@/queries.ts'; import { getAncestors, getDescendants, getEvent } from '@/queries.ts';
import { signEvent } from '@/sign.ts'; import { signEvent } from '@/sign.ts';
import { toStatus } from '@/transformers/nostr-to-mastoapi.ts'; import { toStatus } from '@/transformers/nostr-to-mastoapi.ts';
@ -31,7 +31,7 @@ const statusController: AppController = async (c) => {
const event = await getEvent(id, { kind: 1 }); const event = await getEvent(id, { kind: 1 });
if (event) { if (event) {
return c.json(await toStatus(event as Event<1>)); return c.json(await toStatus(event));
} }
return c.json({ error: 'Event not found.' }, 404); return c.json({ error: 'Event not found.' }, 404);