add put method

This commit is contained in:
Dan Percic 2021-09-28 22:06:54 +03:00
parent 33da1ce585
commit 27eebf7f78

View File

@ -57,6 +57,19 @@ export abstract class GenericService<Entity> {
});
}
@Validate()
protected _put<R = Entity>(
@RequiredParam() body: unknown,
modelPath = this._defaultModelPath,
queryParams?: List<QueryParam>
): Observable<R> {
return this._http.put<R>(`/${encodeURI(modelPath)}`, body, {
params: this._queryParams(queryParams),
headers: HeadersConfiguration.getHeaders(),
observe: 'body'
});
}
@Validate()
protected _getOne<R = Entity>(
@RequiredParam() path: List,