(account: string, container: string, filepath: string, write: boolean)
| 56 | return response.data; |
| 57 | } |
| 58 | async getSasToken(account: string, container: string, filepath: string, write: boolean): Promise<Object> { |
| 59 | try { |
| 60 | const response = await this.authUtil.requestWithAuthIfRequired({ |
| 61 | method: 'get', |
| 62 | url: `/api/datasources/${account}/${container}/${filepath}/sas?write=${write}`, |
| 63 | }); |
| 64 | if (!response.data) { |
| 65 | return null; |
| 66 | } |
| 67 | |
| 68 | return response |
| 69 | |
| 70 | } catch (error) { |
| 71 | const status = error.response.status |
| 72 | if (status !== 200) { |
| 73 | throw new Error(`Unexpected status code: ${status}`); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | } |
| 78 | async update(dataSource: DataSource): Promise<DataSource> { |
| 79 | const response = await this.authUtil.requestWithAuthIfRequired({ |
| 80 | method: 'put', |
nothing calls this directly
no test coverage detected