Skip to content

Commit cd04bef

Browse files
Andrea Barbassoatarix83
authored andcommitted
Merged in task/dspace-cris-2023_02_x/DSC-2050 (pull request DSpace#2754)
[DSC-2050] fix missing queryParam in url from download metric Approved-by: Francesco Molinaro Approved-by: Giuseppe Digilio
2 parents a2af6af + 91f14e3 commit cd04bef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/app/shared/metric/metric-default/metric-default.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Component, OnInit } from '@angular/core';
22
import { BaseMetricComponent } from '../metric-loader/base-metric.component';
3+
import { METRIC_TYPE_DOWNLOAD } from '../metric-embedded/metric-embedded-download/metric-embedded-download.component';
34

45
@Component({
56
selector: 'ds-metric-default',
@@ -16,5 +17,8 @@ export class MetricDefaultComponent extends BaseMetricComponent implements OnIni
1617

1718
ngOnInit(): void {
1819
this.url = this.getDetailUrl();
20+
if (this.metric.metricType === 'download') {
21+
this.url += (this.url.includes('?') ? '&' : '?') + 'reportType=' + METRIC_TYPE_DOWNLOAD;
22+
}
1923
}
2024
}

0 commit comments

Comments
 (0)