createOrganization
@svenvw/fdm-source / fdm-core/src / createOrganization
Function: createOrganization()
createOrganization(
fdm,owner_id,name,slug,description):Promise<string>
Defined in: fdm-core/src/organization.ts:18
Creates a new organization and assigns the creating user as the owner.
Parameters
fdm
any
The FDM instance providing the connection to the database.
owner_id
string
The ID of the user creating the organization.
name
string
The name of the organization.
slug
string
The unique slug for the organization.
description
string
A description of the organization.
Returns
Promise<string>
A promise that resolves with the ID of the newly created organization.
Throws
Throws an error if any database operation fails or if the input data is invalid.