feat: admin org management API + member login fixes
Add NestJS endpoints the admin panel org UI was calling (all returning 404): - GET/POST /admin/orgs — list and create organizations - GET /admin/orgs/:id — org detail with tenants and orgAdmins - POST /admin/orgs/:id/admins — create OrgAdmin with hashed password - PATCH /admin/tenants/:id/org — assign/unassign tenant from org Also ship the member login page and sidebar fix from the previous session: - Move /my/login to /member-login to break infinite redirect loop - Add /member-login to PUBLIC_PATHS in sidebar so it is not intercepted Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ const SUPER_ADMIN_LINKS = [
|
||||
{ href: '/admin/drafts', label: 'AI Drafts' },
|
||||
];
|
||||
|
||||
const PUBLIC_PATHS = ['/login', '/signup', '/onboard'];
|
||||
const PUBLIC_PATHS = ['/login', '/signup', '/onboard', '/member-login'];
|
||||
const ADMIN_PATHS = ['/admin'];
|
||||
const MEMBER_PATHS = ['/my'];
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ const NAV = [
|
||||
|
||||
export default async function MemberLayout({ children }: { children: React.ReactNode }) {
|
||||
const token = await getMemberToken();
|
||||
if (!token) redirect('/my/login');
|
||||
if (!token) redirect('/member-login');
|
||||
|
||||
return (
|
||||
<div className="flex h-full -m-6 min-h-screen">
|
||||
|
||||
Reference in New Issue
Block a user