johnandersen777.bsky.social/knotless
git that lives in your Atmosphere account
Forked from chadtmiller.com/knotless
0
0
import type * as getActorRepos from '#lib/lexicons/dev/knotless/getActorRepos.ts';
import type * as listBlocks from '#lib/lexicons/dev/knotless/listBlocks.ts';
import type { PageLoad } from './$types';
import { xrpc } from '#lib/data.ts';
/** Whom the account blocks, and its public repositories, one of which a block can name: none for no one. */
export const load: PageLoad = async (event) => {
const { me } = await event.parent();
if (!me) return { blocks: null, repos: [] };
const [blocks, { repos }] = await Promise.all([
xrpc<typeof listBlocks.main>(event, 'dev.knotless.listBlocks', {}),
xrpc<typeof getActorRepos.main>(event, 'dev.knotless.getActorRepos', { actor: me.did })
]);
return { blocks: blocks.blocks, repos: repos.filter((r) => !r.private) };
};