Files
Moonbase/scripts/reset-password.ts
2026-06-29 16:45:19 -05:00

15 lines
442 B
TypeScript

import { PrismaClient } from "@prisma/client";
import { hashSync } from "bcryptjs";
const db = new PrismaClient();
async function main() {
const hash = hashSync("moonbase!", 10);
const result = await db.user.updateMany({
data: { passwordHash: hash, mustChangePassword: false },
});
console.log(`Reset password for ${result.count} user(s). Login with: moonbase!`);
}
main().catch(console.error).finally(() => db.$disconnect());