From 2d259d22b0281aec75c54148c8315e5d83b29f9c Mon Sep 17 00:00:00 2001 From: Shreyaschorge Date: Fri, 11 Jul 2025 03:25:17 +0530 Subject: [PATCH] remove unnecessary post request --- src/app/api/auth/session-signers/route.ts | 42 ----------------------- 1 file changed, 42 deletions(-) diff --git a/src/app/api/auth/session-signers/route.ts b/src/app/api/auth/session-signers/route.ts index 7a72016..630ef3b 100644 --- a/src/app/api/auth/session-signers/route.ts +++ b/src/app/api/auth/session-signers/route.ts @@ -1,6 +1,4 @@ import { NextResponse } from 'next/server'; -import { getServerSession } from 'next-auth'; -import { authOptions } from '~/auth'; import { getNeynarClient } from '~/lib/neynar'; export async function GET(request: Request) { @@ -43,43 +41,3 @@ export async function GET(request: Request) { ); } } - -export async function POST(request: Request) { - try { - const session = await getServerSession(authOptions); - - if (!session?.user?.fid) { - return NextResponse.json( - { error: 'No authenticated session found' }, - { status: 401 } - ); - } - - const body = await request.json(); - const { message, signature, signers, user } = body; - - if (!message || !signature || !signers) { - return NextResponse.json( - { error: 'Message, signature, and signers are required' }, - { status: 400 } - ); - } - - // Since we can't directly modify the session token here, - // we'll return the data and let the client trigger a session update - // The client will need to call getSession() to refresh the session - - return NextResponse.json({ - success: true, - message: 'Session data prepared for update', - signers, - user, - }); - } catch (error) { - console.error('Error updating session signers:', error); - return NextResponse.json( - { error: 'Failed to update session' }, - { status: 500 } - ); - } -}