File size: 382 Bytes
82be208
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import type { PageLoad } from './$types';
import { initStores } from '$lib/stores/init';
import { validateApiKey } from '$lib/utils';

export const load: PageLoad = async ({ fetch }) => {
	// loads run before the root layout script, so the stored API key reaches
	// the probe only once the settings store has read localStorage
	await initStores();
	await validateApiKey(fetch);
};