fix: change admin role string to enterprise to match frontend logic

This commit is contained in:
Mohan Ki
2026-07-27 15:19:11 +05:30
parent c55ac6225a
commit c3ba7c1be3
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ router.post('/register', async (req, res) => {
const countQuery = await pgPool.query('SELECT COUNT(*) FROM users');
const userCount = parseInt(countQuery.rows[0].count, 10);
const assignedRole = userCount === 0 ? 'admin' : 'free_trial';
const assignedRole = userCount === 0 ? 'enterprise' : 'free_trial';
const salt = await bcrypt.genSalt(10);
const hash = await bcrypt.hash(password, salt);