23 lines
565 B
TypeScript
23 lines
565 B
TypeScript
|
|
import { db } from './src/config/database';
|
|
|
|
async function fixUser() {
|
|
try {
|
|
// Hardcoded fix for ruibto@gmail.com based on previous check
|
|
const userEmail = 'ruibto@gmail.com';
|
|
const partnerId = 4; // Consultt Clinic
|
|
|
|
await db('users')
|
|
.where({ email: userEmail })
|
|
.update({ partner_id: partnerId });
|
|
|
|
console.log(`Updated user ${userEmail} with partner_id ${partnerId}`);
|
|
process.exit(0);
|
|
} catch (error) {
|
|
console.error(error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
fixUser();
|