~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/knotless

git that lives in your Atmosphere account

Forked from chadtmiller.com/knotless

0
0
17 lines · 620 B Raw History
import type * as getPreferences from '#lib/lexicons/dev/knotless/getPreferences.ts';
import type { PageLoad } from './$types';
import { xrpc } from '#lib/data.ts';
import { notificationsOf } from '#lib/preferences.ts';

/** Which notifications the account hears of: none for no one, or from a server that keeps no index. */
export const load: PageLoad = async (event) => {
	const { me } = await event.parent();
	if (!me) return { preferences: null };
	const all = await xrpc<typeof getPreferences.main>(
		event,
		'dev.knotless.getPreferences',
		{},
		true
	);
	return { preferences: all && notificationsOf(all) };
};