import { NextResponse } from 'next/server' import { driftTradingService } from '../../../../lib/drift-trading' export async function POST() { try { const loginStatus = await driftTradingService.login() return NextResponse.json(loginStatus) } catch (error: any) { return NextResponse.json( { isLoggedIn: false, publicKey: '', userAccountExists: false, error: error.message }, { status: 500 } ) } }