getApiKeys method

Future<List<OrgApiKeyModel>> getApiKeys(
  1. String orgId
)

Implementation

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