Added redemptions & redeemable actions. Fixed a few bugs.

This commit is contained in:
Tom
2024-06-24 22:16:55 +00:00
parent 68df045c54
commit 6548ce33e0
35 changed files with 1787 additions and 471 deletions

View File

@ -24,7 +24,7 @@ export async function GET(req: Request) {
return NextResponse.json(users)
}
if (id) {
const users = await db.user.findUnique({
const users = await db.user.findFirst({
where: {
id: id
}
@ -35,7 +35,7 @@ export async function GET(req: Request) {
const users = await db.user.findMany();
return NextResponse.json(users)
} catch (error) {
console.log("[AUTH/ACCOUNT/IMPERSONATION]", error);
console.log("[USERS]", error);
return new NextResponse("Internal Error", { status: 500 });
}
}