aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)/bounties/+page.server.ts
blob: c9d872b0229e2d01f4f7078a8d41ed42d49bd385 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { get } from "$lib/utils";
export const load = async () => {
	const users = [
		{ username: "fustler", merchant: "rrdrive", type: "Bakery" },
		{ username: "laluna", merchant: "butchersguild", type: "Butcher Shop" },
		{ username: "ica547", merchant: "vanlove", type: "Sushi Restaurant" },
		{ username: "reverendhodl", merchant: "laughingbean", type: "Cafe" },
	];

	for (const user of users) {
		const { username, merchant } = user;
		console.log(username, merchant);
		user.user = await get(`/users/${username}`);
		user.merchant = await get(`/users/${merchant}`);
	}

	return { users };
};