mirror of
https://github.com/margrop/wrong-notebook.git
synced 2026-12-07 04:17:32 +08:00
调整标签页,支持按科目折叠
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
import { PrismaClient } from "@prisma/client"
|
||||
import { compare } from "bcryptjs"
|
||||
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
async function main() {
|
||||
const user = await prisma.user.findUnique({
|
||||
where: { email: 'admin@localhost' },
|
||||
})
|
||||
|
||||
if (!user) {
|
||||
console.log("User not found")
|
||||
return
|
||||
}
|
||||
|
||||
const isValid = await compare("123456", user.password)
|
||||
console.log("Password '123456' is valid:", isValid)
|
||||
}
|
||||
|
||||
main()
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
process.exit(1)
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect()
|
||||
})
|
||||
Reference in New Issue
Block a user