fix(import): route member CSV import through the server action (security/data)
The members branch was inserting space_members directly from the browser with user_id: crypto.randomUUID() -- a fabricated id that violates the auth.users FK (offline members must be user_id NULL) and bypassed all server-side validation. Now maps columns and calls the existing admin-gated, Zod-validated, batched importMembers action; surfaces count + skipped. Dropped the now-unused spaceId prop.
This commit is contained in:
@@ -26,7 +26,7 @@ export default async function ImportPage() {
|
||||
<PageTitle>Import & Sync</PageTitle>
|
||||
<p className="font-mono text-xs text-sidebar-foreground/50">CSV import · member & payment data</p>
|
||||
</div>
|
||||
<ImportClient spaceId={member!.space_id} role={member!.role} />
|
||||
<ImportClient role={member!.role} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user