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

export const load = async ({ cookies }) => {
	const token = cookies.get("token");
	const ro = token ? await get("/ro", auth(cookies)) : undefined;
	return { ro, token };
};

export const actions = {
	default: updateUser,
};