fix: update masonry grid sizing logic and notebook list padding
This commit is contained in:
36
keep-notes/scripts/reset-password-auto.ts
Normal file
36
keep-notes/scripts/reset-password-auto.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
import { prisma } from '../lib/prisma'
|
||||
import bcrypt from 'bcryptjs'
|
||||
|
||||
async function main() {
|
||||
const email = 'test@example.com'
|
||||
const newPassword = 'password123'
|
||||
|
||||
console.log(`Resetting password for ${email}...`)
|
||||
|
||||
const hashedPassword = await bcrypt.hash(newPassword, 10)
|
||||
|
||||
try {
|
||||
const user = await prisma.user.update({
|
||||
where: { email },
|
||||
data: {
|
||||
password: hashedPassword,
|
||||
resetToken: null,
|
||||
resetTokenExpiry: null
|
||||
},
|
||||
})
|
||||
console.log(`✅ Password successfully reset for ${user.email}`)
|
||||
} catch (error) {
|
||||
console.error('❌ Error resetting password:', error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
.catch(e => {
|
||||
console.error(e)
|
||||
process.exit(1)
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect()
|
||||
})
|
||||
Reference in New Issue
Block a user