feat: add Solana USDT/USDC support and refine admin payouts UI

This commit is contained in:
mstfyldz
2026-03-13 05:17:04 +03:00
parent 5f0df83686
commit 641498957c
16 changed files with 1335 additions and 120 deletions

View File

@@ -0,0 +1,23 @@
import { NextRequest, NextResponse } from 'next/server';
import { db } from '@/lib/db';
export async function GET(req: NextRequest) {
try {
const result = await db.query(`
SELECT
p.*,
m.name as merchant_name
FROM payouts p
LEFT JOIN merchants m ON p.merchant_id = m.id
ORDER BY p.created_at DESC
`);
return NextResponse.json({
success: true,
payouts: result.rows
});
} catch (error: any) {
console.error('[Payouts List API] Error:', error);
return NextResponse.json({ error: error.message }, { status: 500 });
}
}