mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Fix mistake and clarify api method name (#347)
This commit is contained in:
@@ -193,7 +193,7 @@ export abstract class ApiService {
|
|||||||
putSendRemovePassword: (id: string) => Promise<SendResponse>;
|
putSendRemovePassword: (id: string) => Promise<SendResponse>;
|
||||||
deleteSend: (id: string) => Promise<any>;
|
deleteSend: (id: string) => Promise<any>;
|
||||||
getSendFileDownloadData: (send: SendAccessView, request: SendAccessRequest) => Promise<SendFileDownloadDataResponse>;
|
getSendFileDownloadData: (send: SendAccessView, request: SendAccessRequest) => Promise<SendFileDownloadDataResponse>;
|
||||||
renewFileUploadUrl: (sendId: string, fileId: string) => Promise<SendFileUploadDataResponse>;
|
renewSendFileUploadUrl: (sendId: string, fileId: string) => Promise<SendFileUploadDataResponse>;
|
||||||
|
|
||||||
getCipher: (id: string) => Promise<CipherResponse>;
|
getCipher: (id: string) => Promise<CipherResponse>;
|
||||||
getCipherAdmin: (id: string) => Promise<CipherResponse>;
|
getCipherAdmin: (id: string) => Promise<CipherResponse>;
|
||||||
|
|||||||
@@ -443,8 +443,8 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
return new SendFileUploadDataResponse(r);
|
return new SendFileUploadDataResponse(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
async renewFileUploadUrl(sendId: string, fileId: string): Promise<SendFileUploadDataResponse> {
|
async renewSendFileUploadUrl(sendId: string, fileId: string): Promise<SendFileUploadDataResponse> {
|
||||||
const r = await this.send('GET', '/sends/' + sendId + '/file/' + fileId + '/renew', null, true, true);
|
const r = await this.send('GET', '/sends/' + sendId + '/file/' + fileId, null, true, true);
|
||||||
return new SendFileUploadDataResponse(r);
|
return new SendFileUploadDataResponse(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -650,7 +650,7 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async renewAttachmentUploadUrl(id: string, attachmentId: string): Promise<AttachmentUploadDataResponse> {
|
async renewAttachmentUploadUrl(id: string, attachmentId: string): Promise<AttachmentUploadDataResponse> {
|
||||||
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);
|
return new AttachmentUploadDataResponse(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class FileUploadService implements FileUploadServiceAbstraction {
|
|||||||
break;
|
break;
|
||||||
case FileUploadType.Azure:
|
case FileUploadType.Azure:
|
||||||
const renewalCallback = async () => {
|
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);
|
uploadData.sendResponse.file.id);
|
||||||
return renewalResponse.url;
|
return renewalResponse.url;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user