Don't let your memes be dreams

This commit is contained in:
Alex Gleason
2024-05-14 18:23:41 -05:00
parent 08c9ee0670
commit 68b5887ed0
38 changed files with 260 additions and 174 deletions

View File

@@ -1,10 +1,11 @@
import { AppController } from '@/app.ts';
import { Conf } from '@/config.ts';
import { Storages } from '@/storages.ts';
import { getInstanceMetadata } from '@/utils/instance.ts';
const instanceController: AppController = async (c) => {
const { host, protocol } = Conf.url;
const meta = await getInstanceMetadata(c.req.raw.signal);
const meta = await getInstanceMetadata(await Storages.db(), c.req.raw.signal);
/** Protocol to use for WebSocket URLs, depending on the protocol of the `LOCAL_DOMAIN`. */
const wsProtocol = protocol === 'http:' ? 'ws:' : 'wss:';