getOrganization
@svenvw/fdm-source / fdm-core/src / getOrganization
Function: getOrganization()
getOrganization(
fdm,organization_slug,user_id):Promise<{description:string;id:string;isVerified:boolean;logo:string|null;name:string;permissions:OrganizationPermissions;slug:string; } |null>
Defined in: fdm-core/src/organization.ts:167
Retrieves an organization by its ID.
Parameters
fdm
any
The FDM instance providing the connection to the database.
organization_slug
string
The slug of the organization to retrieve.
user_id
string
The ID of the user for whom to retrieve organizations.
Returns
Promise<{ description: string; id: string; isVerified: boolean; logo: string | null; name: string; permissions: OrganizationPermissions; slug: string; } | null>
A promise that resolves with the organization details and permisssions of user, or null if not found.
Throws
Throws an error if any database operation fails.