getOrganicCertification
@svenvw/fdm-source / fdm-core/src / getOrganicCertification
Function: getOrganicCertification()
getOrganicCertification(
fdm,principal_id,b_id_organic):Promise<OrganicCertification|undefined>
Defined in: fdm-core/src/organic.ts:294
Retrieves the details of a single organic certification by its ID.
This function checks if the principal has 'read' permission on the associated farm before returning the certification details.
Parameters
fdm
any
The FDM instance providing the connection to the database.
principal_id
any
The identifier of the principal requesting the certification.
b_id_organic
any
The identifier of the organic certification to retrieve.
Returns
Promise<OrganicCertification | undefined>
A Promise that resolves with the organic certification details, or undefined if not found.
Throws
If the principal does not have permission or the database transaction fails.