diff --git a/src/utils/web.ts b/src/utils/web.ts index a782299..9a3eaf0 100644 --- a/src/utils/web.ts +++ b/src/utils/web.ts @@ -2,6 +2,7 @@ import { type AppContext } from '@/app.ts'; import { Conf } from '@/config.ts'; import { type Context, + Debug, type Event, EventTemplate, Filter, @@ -15,6 +16,8 @@ import { signAdminEvent, signEvent } from '@/sign.ts'; import { nostrNow } from '@/utils.ts'; import { eventsDB } from '@/db/events.ts'; +const debug = Debug('ditto:api'); + /** EventTemplate with defaults. */ type EventStub = TypeFest.SetOptional, 'content' | 'created_at' | 'tags'>; @@ -79,6 +82,7 @@ async function createAdminEvent(t: EventStub, c: AppContext /** Push the event through the pipeline, rethrowing any RelayError. */ async function publishEvent(event: Event, c: AppContext): Promise> { + debug('EVENT', event); try { await pipeline.handleEvent(event); } catch (e) {