feat: add tomorrow weather brief notifications
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user