Skip to main content

isMeasureCatalogueEnabled

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-core/src / isMeasureCatalogueEnabled

Function: isMeasureCatalogueEnabled()

isMeasureCatalogueEnabled(fdm, principal_id, b_id_farm, m_source): Promise<boolean>

Defined in: fdm-core/src/catalogues.ts:612

Checks if a measure catalogue is enabled for a farm.

Parameters

fdm

PgDatabase

The FDM instance providing the connection to the database. The instance can be created with createFdmServer.

principal_id

any

The ID of the principal making the request.

b_id_farm

any

The ID of the farm.

m_source

string

The source/name of the measure catalogue to check.

Returns

Promise<boolean>

A Promise that resolves to true if the catalogue is enabled, false otherwise.

Throws

If checking the catalogue status fails.