Skip to content

Commit

Permalink
fixed prettier issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jaipise committed Mar 23, 2024
1 parent cb6dca8 commit fb85341
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
13 changes: 9 additions & 4 deletions packages/logging-service/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ import path from 'path';
transport: Transport.GRPC,
options: {
package: 'error_logging',
protoPath: path.join(__dirname, '../../', 'juno-proto/dist/definitions', 'error_loggin.proto')
}
}
])
protoPath: path.join(
__dirname,
'../../',
'juno-proto/dist/definitions',
'error_loggin.proto',
),
},
},
]),
],
controllers: [AppController],
providers: [AppService],
Expand Down
21 changes: 11 additions & 10 deletions packages/logging-service/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ import { ClientGrpc } from '@nestjs/microservices';
import { Observable } from 'rxjs';

interface LoggingService {
recordError(errorLogRequest: { message: string }): Observable<void>;
recordError(errorLogRequest: { message: string }): Observable<void>;
}

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

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

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

recordError(message: string) {
// TODO: currently doing nothing here, but want to actually log the error
return;
}
recordError(message: string) {
// TODO: currently doing nothing here, but want to actually log the error
return;
}
}
2 changes: 1 addition & 1 deletion packages/logging-service/test/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ describe('AppService', () => {
const testMessage = 'Test error';
expect(service.recordError(testMessage)).toBeUndefined();
});
})
});

0 comments on commit fb85341

Please sign in to comment.