diff options
Diffstat (limited to 'apps/web/src/app')
| -rw-r--r-- | apps/web/src/app/api/feedback/route.ts | 31 | ||||
| -rw-r--r-- | apps/web/src/app/page.tsx | 26 |
2 files changed, 5 insertions, 52 deletions
diff --git a/apps/web/src/app/api/feedback/route.ts b/apps/web/src/app/api/feedback/route.ts deleted file mode 100644 index cd853eea..00000000 --- a/apps/web/src/app/api/feedback/route.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { type NextRequest, NextResponse } from "next/server"; -import { z } from "zod"; -import { checkRateLimit } from "@/auth/rate-limit"; -import { submitFeedback, MAX_MESSAGE_LENGTH } from "@/feedback"; - -const submitSchema = z.object({ - message: z - .string() - .min(1, "Message is required") - .max(MAX_MESSAGE_LENGTH, "Message too long"), -}); - -export async function POST(request: NextRequest) { - const { limited } = await checkRateLimit({ request }); - if (limited) { - return NextResponse.json({ error: "Too many requests" }, { status: 429 }); - } - - const body = await request.json(); - const result = submitSchema.safeParse(body); - - if (!result.success) { - return NextResponse.json( - { error: "Invalid input", details: result.error.flatten().fieldErrors }, - { status: 400 }, - ); - } - - const entry = await submitFeedback(result.data); - return NextResponse.json({ entry }, { status: 201 }); -} diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index 6084a912..287775c5 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -1,21 +1,5 @@ -import { Hero } from "@/components/landing/hero";
-import { Header } from "@/components/header";
-import { Footer } from "@/components/footer";
-import type { Metadata } from "next";
-import { SITE_URL } from "@/site/brand";
-
-export const metadata: Metadata = {
- alternates: {
- canonical: SITE_URL,
- },
-};
-
-export default async function Home() {
- return (
- <div>
- <Header />
- <Hero />
- <Footer />
- </div>
- );
-}
+import { redirect } from "next/navigation"; + +export default function Home() { + redirect("/projects"); +} |
