This commit is contained in:
2025-12-25 23:49:47 -07:00
parent 13821cbcd5
commit 0d608cf3f4
26 changed files with 7 additions and 94 deletions

View File

@@ -7,7 +7,6 @@ import { eq } from 'drizzle-orm';
const user = Astro.locals.user;
if (!user) return Astro.redirect('/login');
// Get user's first organization
const userMembership = await db.select()
.from(members)
.where(eq(members.userId, user.id))
@@ -15,7 +14,6 @@ const userMembership = await db.select()
if (!userMembership) return Astro.redirect('/dashboard');
// Get all categories for the organization
const allCategories = await db.select()
.from(categories)
.where(eq(categories.organizationId, userMembership.organizationId))