File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const POST = async (request: any) => {
1212 return new NextResponse ( "Email is already in use" , { status : 400 } ) ;
1313 }
1414
15- const hashedPassword = await bcrypt . hash ( password , 5 ) ;
15+ const hashedPassword = await bcrypt . hash ( password , 14 ) ;
1616
1717 try {
1818 await prisma . user . create ( {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ async function getAllUsers(request, response) {
1414async function createUser ( request , response ) {
1515 try {
1616 const { email, password, role } = request . body ;
17- const hashedPassword = await bcrypt . hash ( password , 5 ) ;
17+ const hashedPassword = await bcrypt . hash ( password , 14 ) ;
1818
1919 const user = await prisma . user . create ( {
2020 data : {
@@ -34,7 +34,7 @@ async function updateUser(request, response) {
3434 try {
3535 const { id } = request . params ;
3636 const { email, password, role } = request . body ;
37- const hashedPassword = await bcrypt . hash ( password , 5 ) ;
37+ const hashedPassword = await bcrypt . hash ( password , 14 ) ;
3838 const existingUser = await prisma . user . findUnique ( {
3939 where : {
4040 id : id ,
Original file line number Diff line number Diff line change 11const { PrismaClient } = require ( "@prisma/client" ) ;
22const prisma = new PrismaClient ( ) ;
3- const bcrypt = require ( "bcryptjs" ) ;
43
54async function getAllWishlist ( request , response ) {
65 try {
You can’t perform that action at this time.
0 commit comments