diff --git a/src/utils/web.ts b/src/utils/web.ts index 91eaacdc..5df00603 100644 --- a/src/utils/web.ts +++ b/src/utils/web.ts @@ -7,12 +7,12 @@ import { nostrNow } from '@/utils.ts'; import type { AppContext } from '@/app.ts'; /** EventTemplate with or without a timestamp. If no timestamp is given, it will be generated. */ -interface PendingEvent extends Omit, 'created_at'> { +interface EventStub extends Omit, 'created_at'> { created_at?: number; } /** Publish an event through the pipeline. */ -async function createEvent(t: PendingEvent, c: AppContext): Promise> { +async function createEvent(t: EventStub, c: AppContext): Promise> { const pubkey = c.get('pubkey'); if (!pubkey) { @@ -28,7 +28,7 @@ async function createEvent(t: PendingEvent, c: AppContext): } /** Publish an admin event through the pipeline. */ -async function createAdminEvent(t: PendingEvent, c: AppContext): Promise> { +async function createAdminEvent(t: EventStub, c: AppContext): Promise> { const event = await signAdminEvent({ created_at: nostrNow(), ...t,