feat: add tomorrow weather brief notifications

This commit is contained in:
zv
2026-06-12 22:10:22 +02:00
parent 3309e03acb
commit 7c3706c3f6
15 changed files with 414 additions and 15 deletions

View File

@@ -27,6 +27,7 @@ export async function POST(request: Request) {
language?: unknown;
enabled?: unknown;
morningBriefEnabled?: unknown;
tomorrowBriefEnabled?: unknown;
latitude?: unknown;
longitude?: unknown;
locationName?: unknown;
@@ -48,6 +49,7 @@ export async function POST(request: Request) {
language,
enabled: body?.enabled !== false,
morningBriefEnabled: body?.morningBriefEnabled === true,
tomorrowBriefEnabled: body?.tomorrowBriefEnabled === true,
latitude: typeof body?.latitude === "number" && Number.isFinite(body.latitude) ? body.latitude : null,
longitude: typeof body?.longitude === "number" && Number.isFinite(body.longitude) ? body.longitude : null,
locationName: typeof body?.locationName === "string" && body.locationName.trim() ? body.locationName.trim().slice(0, 80) : null,