fix: update user fields to match schema

- Replace firstName/lastName with name field in users API route
- Update user formatting in UsersTab component
- Add email fallback when name is not available
This commit is contained in:
2024-12-04 14:45:24 -05:00
parent 95b106d9e9
commit 29ce631901
36 changed files with 2700 additions and 167 deletions

View File

@@ -7,16 +7,9 @@ config({ path: '.env.local' });
async function dropAllTables() {
try {
// drop all tables, regardless of name
await sql`
DROP TABLE IF EXISTS
user_roles,
role_permissions,
permissions,
roles,
participant,
study,
users
CASCADE;
DROP TABLE IF EXISTS ${sql.raw(Object.values(tables).map(table => table.name).join(', '))}
`;
console.log('All tables dropped successfully');
} catch (error) {