mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
fixing signup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import { db } from '@db/index';
|
||||
import { usersMerged } from '@schemas/schema';
|
||||
import { users } from '@schemas/schema';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import { eq } from 'drizzle-orm';
|
||||
|
||||
@@ -14,9 +14,9 @@ export async function POST(request: Request) {
|
||||
username,
|
||||
email,
|
||||
password_hash: hashedPassword,
|
||||
} satisfies typeof usersMerged.$inferInsert;
|
||||
} satisfies typeof users.$inferInsert;
|
||||
|
||||
await db.insert(usersMerged).values(newUser);
|
||||
await db.insert(users).values(newUser);
|
||||
|
||||
return NextResponse.json(
|
||||
{ message: 'User created successfully', redirect: '/' },
|
||||
|
||||
Reference in New Issue
Block a user