All files / apps/api-gateway/src/gateway/clients activity.client.ts

100% Statements 8/8
100% Branches 4/4
100% Functions 2/2
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 162x   2x     2x   4x       3x 3x      
import { Injectable } from '@nestjs/common';
import { ActivityEventDto, CursorPage } from '../http/api-types';
import { DownstreamClient } from '../http/downstream.client';
 
@Injectable()
export class ActivityClient extends DownstreamClient {
  constructor() {
    super(process.env.AUDIT_URL ?? 'http://localhost:3004', 'audit service');
  }
 
  list(query: Record<string, string>): Promise<CursorPage<ActivityEventDto>> {
    const search = new URLSearchParams(query).toString();
    return this.get(`/activity${search ? `?${search}` : ''}`);
  }
}