19 lines
443 B
TypeScript
19 lines
443 B
TypeScript
import { inject, Injectable } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Observable } from 'rxjs';
|
|
|
|
export interface ShipmentResponse {
|
|
message: string;
|
|
}
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class ShipmentService {
|
|
private readonly http = inject(HttpClient);
|
|
|
|
trackAndTrace(): Observable<ShipmentResponse> {
|
|
return this.http.get<ShipmentResponse>('/rest/Shipment/v1.0/trackandtrace');
|
|
}
|
|
}
|