[recommendations-and-nl-search | DONE | CHANGED]: Removed "|50" prefix addition/deletion from result id.

1. recommendations.service.ts: In method "getRecommendationsForPublication()", removed "50|" prefix from result_id sent in request body.
2. recommendation-card.component.ts: Removed method "removePrefix()" and usage of it.
This commit is contained in:
Konstantina Galouni 2024-09-09 13:08:16 +03:00
parent 4ad31e7b5c
commit a75d220760
2 changed files with 3 additions and 7 deletions

View File

@ -7,7 +7,7 @@ import {User} from "../login/utils/helper.class";
@Component({
selector: 'recommendation-card',
template: `
<a [routerLink]="properties.searchLinkToResult.split('?')[0]" [queryParams]="{'id': removePrefix(result.result_id)}"
<a [routerLink]="properties.searchLinkToResult.split('?')[0]" [queryParams]="{'id': result.result_id}"
(click)="category && result && community ? selectResult(category, result, community) : ''" class="uk-link-reset" target="_blank">
<div class="uk-card uk-card-default uk-card-hover uk-text-xsmall uk-padding-small">
<ng-container *ngIf="result.result_title">
@ -43,8 +43,4 @@ export class RecommendationCardComponent {
// console.log(data);
}));
}
removePrefix(str: string) {
return str.substring(str.indexOf("|") + 1);
}
}

View File

@ -68,8 +68,8 @@ export class RecommendationsService {
getRecommendationsForPublication(url: string, id: string) {
const body = {
"num": 6,
"result_id": "50|" + id
// "result_id": "50|doi_dedup___::b0c1c7d86521ca2cce50610e8f61fa04"
"result_id": id
// "result_id": "doi_dedup___::b0c1c7d86521ca2cce50610e8f61fa04"
};
const options = {
headers: new HttpHeaders({