Files
task-manager/scripts/check-user.ts
T
2025-12-12 08:35:48 +01:00

26 lines
647 B
TypeScript

import { storage } from "../server/storage";
async function run() {
try {
const user = await storage.getUserByUsername("admin");
if (user) {
console.log("User found:", {
id: user.id,
username: user.username,
role: user.role,
aiEnabled: user.aiEnabled,
// Check if property exists
hasAiEnabled: "aiEnabled" in user
});
} else {
console.log("User 'admin' not found");
}
process.exit(0);
} catch (e) {
console.error(e);
process.exit(1);
}
}
run();