first commit
This commit is contained in:
commit
c9fb67e751
423 files changed
+53287
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import * as bcrypt from "bcryptjs";
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
const senhaHash = await bcrypt.hash("34641747", 10);
|
||||
|
||||
await prisma.usuario.upsert({
|
||||
where: { email: "rodrigo@advx.com" },
|
||||
update: {},
|
||||
create: {
|
||||
email: "rodrigo@advx.com",
|
||||
nome: "Rodrigo",
|
||||
senha: senhaHash,
|
||||
cargo: "admin",
|
||||
dataCriacao: new Date(),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
main()
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
Reference in new issue
Block a user