Skip to content

Commit

Permalink
fix service def
Browse files Browse the repository at this point in the history
  • Loading branch information
tmthecoder committed Mar 30, 2024
1 parent a7cabbb commit 64fce82
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions packages/logging-service/src/app.service.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
import { Inject, Injectable, OnModuleInit } from '@nestjs/common';
import { ClientGrpc } from '@nestjs/microservices';
import { Observable } from 'rxjs';

interface LoggingService {
recordError(errorLogRequest: { message: string }): Observable<void>;
}
import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService implements OnModuleInit {
private loggingService: LoggingService;

constructor(@Inject('LOGGING_SERVICE') private client: ClientGrpc) {}

onModuleInit() {
this.loggingService =
this.client.getService<LoggingService>('LoggingService');
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
recordError(message: string) {
// TODO: currently doing nothing here, but want to actually log the error
return;
}
}
export class AppService {}

0 comments on commit 64fce82

Please sign in to comment.