getIntegrations method

Future<List<OrgIntegrationModel>> getIntegrations(
  1. String orgId
)

Implementation

Future<List<OrgIntegrationModel>> getIntegrations(String orgId) async {
  final response = await _client
      .from('org_integrations_safe')
      .select()
      .eq('org_id', orgId)
      .order('installed_at', ascending: false);
  return (response as List<dynamic>)
      .map((r) => OrgIntegrationModel.fromJson(r as Map<String, dynamic>))
      .toList();
}