fix: change admin role string to enterprise to match frontend logic
This commit is contained in:
+4
-2
@@ -52,8 +52,10 @@ const initDb = async () => {
|
||||
await pgPool.query(sql);
|
||||
console.log('Database initialized successfully.');
|
||||
|
||||
// Force promote the owner to admin
|
||||
await pgPool.query("UPDATE users SET role = 'admin' WHERE email = 'mohan.k@cavininfotech.com'");
|
||||
// Force promote the owner to admin (enterprise role)
|
||||
await pgPool.query("UPDATE users SET role = 'enterprise' WHERE email = 'mohan.k@cavininfotech.com'");
|
||||
await pgPool.query("UPDATE users SET role = 'enterprise' WHERE email = 'admin@cavininfotech.com'");
|
||||
await pgPool.query("UPDATE users SET role = 'enterprise' WHERE role = 'admin'");
|
||||
} catch (err) {
|
||||
console.error('Database initialization failed:', err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user