remove unnecessary post request

This commit is contained in:
Shreyaschorge 2025-07-11 03:25:17 +05:30
parent 16896db17c
commit 2d259d22b0
No known key found for this signature in database

View File

@ -1,6 +1,4 @@
import { NextResponse } from 'next/server'; import { NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '~/auth';
import { getNeynarClient } from '~/lib/neynar'; import { getNeynarClient } from '~/lib/neynar';
export async function GET(request: Request) { 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 }
);
}
}