fix generic type for get method

This commit is contained in:
Dan Percic 2021-10-06 11:16:56 +03:00
parent 4e84610f65
commit 56ef15eecb

View File

@ -32,8 +32,8 @@ export abstract class GenericService<I> {
}
@Validate()
getAll<R = I>(modelPath = this._defaultModelPath): Observable<R[]> {
return this._http.get<R[]>(`/${encodeURI(modelPath)}`, {
getAll<R = I[]>(modelPath = this._defaultModelPath): Observable<R> {
return this._http.get<R>(`/${encodeURI(modelPath)}`, {
headers: HeadersConfiguration.getHeaders({ contentType: false }),
observe: 'body',
});