Skip to content

Commit 7360a10

Browse files
committed
More WIP
1 parent e45967c commit 7360a10

File tree

1 file changed

+12
-3
lines changed
  • app/institutions/dashboard/-components/object-list

1 file changed

+12
-3
lines changed

app/institutions/dashboard/-components/object-list/component.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,23 @@ export default class InstitutionalObjectList extends Component<InstitutionalObje
7474
}
7575

7676
downloadUrl(format: string) {
77-
return format; // TODO: implement
77+
const searchUrl = new URL('test');
78+
searchUrl.searchParams.append('acceptMediatype', format);
79+
const fileName = `${this.args.institution.name}-${this.args.objectType}-search-results`; // Extension?
80+
searchUrl.searchParams.append('withFileName', fileName);
81+
return searchUrl.toString();
7882
}
83+
7984
get downloadCsvUrl() {
80-
return this.downloadUrl('csv');
85+
return this.downloadUrl('text/csv');
8186
}
8287

8388
get downloadTsvUrl() {
84-
return this.downloadUrl('tsv');
89+
return this.downloadUrl('text/tab-separated-values');
90+
}
91+
92+
get downloadJsonUrl() {
93+
return this.downloadUrl('application/json');
8594
}
8695

8796
@action

0 commit comments

Comments
 (0)