moved to single project
This commit is contained in:
19
ui/hv2-ui/src/app/test-output.service.ts
Normal file
19
ui/hv2-ui/src/app/test-output.service.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { MessageService } from './message.service';
|
||||
import { serviceBaseUrl } from './config';
|
||||
import { TestOutput } from './testOutput';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestOutputService {
|
||||
constructor(private messageService: MessageService, private http: HttpClient) { }
|
||||
|
||||
async getTestOutput(): Promise<TestOutput> {
|
||||
this.messageService.add(`TestOutputService: fetch test output`);
|
||||
return this.http.get<TestOutput>(`${serviceBaseUrl}/v1/test`).toPromise()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user