20 lines
487 B
TypeScript
20 lines
487 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
import * as bcrypt from 'bcrypt';
|
|
|
|
async function main() {
|
|
const prisma = new PrismaClient();
|
|
const password = await bcrypt.hash('admin123', 10);
|
|
|
|
await prisma.user.updateMany({
|
|
where: {
|
|
email: { in: ['admin@igcrm.com', 'akhil@gmail.com', 'ramesh@gmail.com'] }
|
|
},
|
|
data: { password }
|
|
});
|
|
|
|
console.log('Passwords updated to admin123 for admin, akhil, and ramesh');
|
|
await prisma.$disconnect();
|
|
}
|
|
|
|
main();
|