Refactored code to always encode the RequestParams

This commit is contained in:
Alexandre Vryghem
2024-03-24 13:32:25 +01:00
parent 404ccd9b0e
commit d5cf236938
9 changed files with 34 additions and 66 deletions

View File

@@ -107,7 +107,7 @@ export class WorkflowItemDataService extends IdentifiableDataService<WorkflowIte
*/
public findByItem(uuid: string, useCachedVersionIfAvailable = false, reRequestOnStale = true, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<WorkspaceItem>[]): Observable<RemoteData<WorkspaceItem>> {
const findListOptions = new FindListOptions();
findListOptions.searchParams = [new RequestParam('uuid', encodeURIComponent(uuid))];
findListOptions.searchParams = [new RequestParam('uuid', uuid)];
const href$ = this.searchData.getSearchByHref(this.searchByItemLinkPath, findListOptions, ...linksToFollow);
return this.findByHref(href$, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
}