getOrganization
@svenvw/fdm-source / fdm-core/src / getOrganization
Function: getOrganization()
getOrganization(
fdm
,organization_slug
,user_id
):Promise
<null
| {description
:string
;id
:string
;isVerified
:boolean
;logo
:null
|string
;name
:string
;permissions
:OrganizationPermissions
;slug
:string
; }>
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
<null
| { description
: string
; id
: string
; isVerified
: boolean
; logo
: null
| string
; name
: string
; permissions
: OrganizationPermissions
; slug
: string
; }>
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.