Skip to content

Commit

Permalink
Change file download method
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoAdamek committed Oct 18, 2024
1 parent 5ba9c67 commit dbe2402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tigerbay",
"version": "1.1.3-beta.1",
"version": "1.1.3-beta.2",
"description": "API Client library for TigerBay",
"main": "lib/client.js",
"type": "commonjs",
Expand Down
3 changes: 2 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ export class Client {
}

public async file(id: number): Promise<AxiosResponse> {
return this.axios.get(`/cms/files/${id}/download`)
const { Url } = (await this.axios.get(`/cms/files/${id}`)).data
return this.axios.get('/..' + Url)
}

public async healthcheck(): Promise<HealthCheckResponse> {
Expand Down

0 comments on commit dbe2402

Please sign in to comment.