From a5ccca05da023c2a8330be6dedd81bcfacda964c Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 20 Apr 2021 14:59:51 -0500 Subject: [PATCH] Fix mistake and clarify api method name (#347) --- src/abstractions/api.service.ts | 2 +- src/services/api.service.ts | 6 +++--- src/services/fileUpload.service.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 633442c4cbd..914afce6b0c 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -193,7 +193,7 @@ export abstract class ApiService { putSendRemovePassword: (id: string) => Promise; deleteSend: (id: string) => Promise; getSendFileDownloadData: (send: SendAccessView, request: SendAccessRequest) => Promise; - renewFileUploadUrl: (sendId: string, fileId: string) => Promise; + renewSendFileUploadUrl: (sendId: string, fileId: string) => Promise; getCipher: (id: string) => Promise; getCipherAdmin: (id: string) => Promise; diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 0f0f5d63fef..dc72e3f1f11 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -443,8 +443,8 @@ export class ApiService implements ApiServiceAbstraction { return new SendFileUploadDataResponse(r); } - async renewFileUploadUrl(sendId: string, fileId: string): Promise { - const r = await this.send('GET', '/sends/' + sendId + '/file/' + fileId + '/renew', null, true, true); + async renewSendFileUploadUrl(sendId: string, fileId: string): Promise { + const r = await this.send('GET', '/sends/' + sendId + '/file/' + fileId, null, true, true); return new SendFileUploadDataResponse(r); } @@ -650,7 +650,7 @@ export class ApiService implements ApiServiceAbstraction { } async renewAttachmentUploadUrl(id: string, attachmentId: string): Promise { - const r = await this.send('GET', '/ciphers/' + id + '/attachment/' + attachmentId, null, true, true); + const r = await this.send('GET', '/ciphers/' + id + '/attachment/' + attachmentId + '/renew', null, true, true); return new AttachmentUploadDataResponse(r); } diff --git a/src/services/fileUpload.service.ts b/src/services/fileUpload.service.ts index a323fe5e284..0ee72dab96a 100644 --- a/src/services/fileUpload.service.ts +++ b/src/services/fileUpload.service.ts @@ -31,7 +31,7 @@ export class FileUploadService implements FileUploadServiceAbstraction { break; case FileUploadType.Azure: const renewalCallback = async () => { - const renewalResponse = await this.apiService.renewFileUploadUrl(uploadData.sendResponse.id, + const renewalResponse = await this.apiService.renewSendFileUploadUrl(uploadData.sendResponse.id, uploadData.sendResponse.file.id); return renewalResponse.url; };