Pass Request signal down from API controllers

This commit is contained in:
Alex Gleason
2024-01-23 15:53:29 -06:00
parent 77f2e2d940
commit 5b24b7ad39
26 changed files with 81 additions and 59 deletions

View File

@@ -5,8 +5,9 @@ import { eventsDB } from '@/storages.ts';
const instanceController: AppController = async (c) => {
const { host, protocol } = Conf.url;
const { signal } = c.req.raw;
const [event] = await eventsDB.query([{ kinds: [0], authors: [Conf.pubkey], limit: 1 }]);
const [event] = await eventsDB.query([{ kinds: [0], authors: [Conf.pubkey], limit: 1 }], { signal });
const meta = jsonServerMetaSchema.parse(event?.content);
/** Protocol to use for WebSocket URLs, depending on the protocol of the `LOCAL_DOMAIN`. */