aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/settings/nostr/+page.server.ts
blob: 84b3fa275f83a07a01816082c713c34a516de98a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import updateUser from "$lib/settings";
import { auth, get } from "$lib/utils";

export const load = async ({ cookies }) => {
	const { challenge } = await get("/challenge");
	const apps = await get("/apps", auth(cookies));

	let offer;
	try {
		({ hash: offer } = await get("/offer", auth(cookies)));
	} catch (e) {}

	return { apps, challenge, offer };
};

export const actions = {
	default: updateUser,
};