From 388185f6f6c546e563088dcb0aa7218d9393b82b Mon Sep 17 00:00:00 2001 From: Chris Ren Date: Tue, 17 Oct 2023 19:43:28 -0700 Subject: [PATCH] chore: remove api route handler --- lib/verifyAuthentication.ts | 0 src/app/api/auth/register/route.ts | 22 ---------------------- 2 files changed, 22 deletions(-) delete mode 100644 lib/verifyAuthentication.ts delete mode 100644 src/app/api/auth/register/route.ts diff --git a/lib/verifyAuthentication.ts b/lib/verifyAuthentication.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/api/auth/register/route.ts b/src/app/api/auth/register/route.ts deleted file mode 100644 index 99beaad..0000000 --- a/src/app/api/auth/register/route.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NextResponse } from 'next/server' -import { User } from '@prisma/client' -import { getSession } from '@lib/session' -// eslint-disable-next-line import/prefer-default-export -export async function POST(request: Request) { - try { - const requestBody = await request.json() - const { user }: { user: User } = requestBody - const response = NextResponse.json({ message: 'ok' }) - - const session = await getSession(request, response) - - session.userId = user.id - - await session.save() - - return response - } catch (error: unknown) { - console.error((error as Error).message) - return new Response(JSON.stringify({ message: (error as Error).message }), { status: 500 }) - } -}