feat(transfer): implement transfer functionality with user selection and balance validation

This commit is contained in:
2026-03-26 23:31:57 +01:00
parent 992c9a2e63
commit 5e2eaff7c4
4 changed files with 248 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
import { NextResponse } from "next/server";
import { auth } from "~/server/auth";
import { db } from "~/server/db";
export async function GET() {
const session = await auth();
if (!session?.user?.id) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
const users = await db.user.findMany({
where: { id: { not: session.user.id } },
select: { id: true, name: true },
orderBy: { name: "asc" },
});
return NextResponse.json(users);
}