diff --git a/src/app/api/widgets/route.ts b/src/app/api/widgets/route.ts index f08ff5a..b220c62 100644 --- a/src/app/api/widgets/route.ts +++ b/src/app/api/widgets/route.ts @@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from "next/server"; import { requireCurrentUser, UnauthorizedError } from "@/lib/auth"; import { prisma } from "@/lib/prisma"; -type WidgetType = "favorites" | "note" | "search" | "calendar" | "calculator" | "clock" | "domain-check"; +type WidgetType = "favorites" | "note" | "search" | "calendar" | "calculator" | "clock" | "domain-check" | "stopwatch"; type ExistingWidgetBox = { x: number; @@ -54,6 +54,11 @@ const widgetCatalog: Record = { title: "Domainprüfung", w: 16, h: 12 + }, + stopwatch: { + title: "Stoppuhr", + w: 12, + h: 20 } }; @@ -65,7 +70,8 @@ function normalizeWidgetType(value: unknown): WidgetType | null { value === "calendar" || value === "calculator" || value === "clock" || - value === "domain-check" + value === "domain-check" || + value === "stopwatch" ) { return value; }