Skip to content

Commit

Permalink
More WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
futa-ikeda committed Nov 27, 2024
1 parent e45967c commit 7360a10
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions app/institutions/dashboard/-components/object-list/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,23 @@ export default class InstitutionalObjectList extends Component<InstitutionalObje
}

downloadUrl(format: string) {
return format; // TODO: implement
const searchUrl = new URL('test');
searchUrl.searchParams.append('acceptMediatype', format);
const fileName = `${this.args.institution.name}-${this.args.objectType}-search-results`; // Extension?
searchUrl.searchParams.append('withFileName', fileName);
return searchUrl.toString();
}

get downloadCsvUrl() {
return this.downloadUrl('csv');
return this.downloadUrl('text/csv');
}

get downloadTsvUrl() {
return this.downloadUrl('tsv');
return this.downloadUrl('text/tab-separated-values');
}

get downloadJsonUrl() {
return this.downloadUrl('application/json');
}

@action
Expand Down

0 comments on commit 7360a10

Please sign in to comment.