mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on the organization and permissions.
This commit is contained in:
@@ -222,7 +222,13 @@ export const deleteOrganizationAction = userAction.schema(z.string()).action(
|
||||
let deletedOrganization: Organization;
|
||||
|
||||
try {
|
||||
deletedOrganization = await deleteOrganization(org.id) as Organization;
|
||||
// TODO : Improve with better auth, always getting 403 error
|
||||
// deletedOrganization = await deleteOrganization(org.id) as Organization;
|
||||
[deletedOrganization] = await db
|
||||
.delete(drizzleDb.schemas.organization)
|
||||
.where(eq(drizzleDb.schemas.organization.id, org.id))
|
||||
.returning();
|
||||
|
||||
} catch (authError: any) {
|
||||
console.error("Auth deletion failed:", authError);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user