mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-12-11 03:42:32 -05:00
17 lines
435 B
TypeScript
17 lines
435 B
TypeScript
import { NextResponse } from 'next/server';
|
|
import { getNeynarClient } from '~/lib/neynar';
|
|
|
|
export async function GET() {
|
|
try {
|
|
const client = getNeynarClient();
|
|
const response = await client.fetchNonce();
|
|
return NextResponse.json(response);
|
|
} catch (error) {
|
|
console.error('Error fetching nonce:', error);
|
|
return NextResponse.json(
|
|
{ error: 'Failed to fetch nonce' },
|
|
{ status: 500 }
|
|
);
|
|
}
|
|
}
|