ai-chatbot/scripts/check_users.ts
Your Name 53ddb7e585
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
Initial commit - clean repository
2025-12-17 20:15:18 +08:00

18 lines
383 B
TypeScript

import { db } from "../lib/db";
import { user } from "../lib/db/schema";
import * as dotenv from "dotenv";
dotenv.config({ path: ".env.local" });
async function main() {
const users = await db.select().from(user);
console.log("Current Users:");
users.forEach((u) => {
console.log(`- ID: ${u.id}, Email: ${u.email}, Role: ${u.role}`);
});
process.exit(0);
}
main();