
import { getDatabase } from '../src/lib/database';

async function makeAdmin(email: string) {
    const db = await getDatabase();
    const user = await db.getUserByEmail(email);
    if (!user) {
        console.log('User not found');
        return;
    }
    await db.updateUser(user.id, { role: 'admin' });
    console.log(`User ${email} updated to admin`);
}

makeAdmin('taratur@gmail.com').catch(console.error);
