Refactor to use Angular inject() for service injection, remove log line

This commit is contained in:
shamoon
2025-07-02 11:18:08 -07:00
parent 476844f32a
commit 87e5d82c46
2 changed files with 6 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ import {
HttpDownloadProgressEvent,
HttpEventType,
} from '@angular/common/http'
import { Injectable } from '@angular/core'
import { inject, Injectable } from '@angular/core'
import { filter, map, Observable } from 'rxjs'
import { environment } from 'src/environments/environment'
@@ -17,7 +17,7 @@ export interface ChatMessage {
providedIn: 'root',
})
export class ChatService {
constructor(private http: HttpClient) {}
private http: HttpClient = inject(HttpClient)
streamChat(documentId: number, prompt: string): Observable<string> {
return this.http