Files
Momento/memento-note/scripts/check-users.ts
Sepehr Ramezani e4d4e23dc7 chore: clean up repo for public release
- Remove BMAD framework, IDE configs, dev screenshots, test files,
  internal docs, and backup files
- Rename keep-notes/ to memento-note/
- Update all references from keep-notes to memento-note
- Add Apache 2.0 license with Commons Clause (non-commercial restriction)
- Add clean .gitignore and .env.docker.example
2026-04-20 22:48:06 +02:00

26 lines
675 B
TypeScript

import { prisma } from '../lib/prisma'
async function main() {
console.log('🔍 Checking users in database...')
console.log('Database URL used:', process.env.DATABASE_URL || "file:./dev.db")
const users = await prisma.user.findMany()
if (users.length === 0) {
console.log('❌ No users found in database!')
} else {
console.log(`✅ Found ${users.length} users:`)
console.table(users.map(u => ({
email: u.email,
role: u.role,
id: u.id,
hasPassword: !!u.password
})))
}
}
main()
.catch(e => console.error(e))
.finally(async () => await prisma.$disconnect())