13 lines
332 B
TypeScript
13 lines
332 B
TypeScript
|
|
import type { PageServerLoad } from './$types';
|
||
|
|
import { error } from '@sveltejs/kit';
|
||
|
|
import { env } from '$env/dynamic/private';
|
||
|
|
|
||
|
|
export const load: PageServerLoad = async () => {
|
||
|
|
if (!env.GEMINI_API_KEY) {
|
||
|
|
error(503, {
|
||
|
|
message: 'Foto-Import ist nicht konfiguriert (GEMINI_API_KEY fehlt).'
|
||
|
|
});
|
||
|
|
}
|
||
|
|
return {};
|
||
|
|
};
|