All Tests Work! Password reset implemented. Users list sorted.

This commit is contained in:
AG
2025-12-10 12:08:11 +02:00
parent bc9b685dec
commit 5597d45e48
16 changed files with 1033 additions and 39 deletions

25
server/promote_admin.ts Normal file
View File

@@ -0,0 +1,25 @@
import prisma from './src/lib/prisma';
(async () => {
try {
const email = process.argv[2];
if (!email) {
console.error('Please provide email');
process.exit(1);
}
await prisma.user.update({
where: { email },
data: {
role: 'ADMIN'
}
});
console.log(`User ${email} promoted to ADMIN`);
} catch (e) {
console.error('Error:', e);
process.exit(1);
} finally {
await prisma.$disconnect();
}
})();