Function: getFarms()
getFarms(
fdm
,principal_id
):Promise
<any
[]>
Defined in: fdm-core/src/farm.ts:115
Alpha
Retrieves a list of farms accessible by the specified principal.
This function uses authorization checks to determine which farms the principal is allowed to read, then returns the corresponding farm details ordered by name.
Parameters
fdm
any
The FDM instance providing the connection to the database. The instance can be created with createFdmServer.
principal_id
any
The identifier of the principal requesting access.
Returns
Promise
<any
[]>
A Promise that resolves with an array of farm detail objects.