mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
[EC-584] Update ApiService to remove any appendages to ClientVersion (#4008)
* [EC-584] Update ApiService to remove any appendages to ClientVersion * [EC-584] Extract application version number logic from ApiService to PlatformUtils * Update libs/electron/src/services/electronPlatformUtils.service.ts Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com> * [EC-584] Use getApplicationVersion as source for getApplicationVersionNumber * [EC-584] Remove defaulting to dash on getApplicationVersionNumber and add unit tests Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@ export abstract class PlatformUtilsService {
|
||||
isViewOpen: () => Promise<boolean>;
|
||||
launchUri: (uri: string, options?: any) => void;
|
||||
getApplicationVersion: () => Promise<string>;
|
||||
getApplicationVersionNumber: () => Promise<string>;
|
||||
supportsWebAuthn: (win: Window) => boolean;
|
||||
supportsDuo: () => boolean;
|
||||
showToast: (
|
||||
|
||||
@@ -2086,7 +2086,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
request.headers.set("Bitwarden-Client-Name", this.platformUtilsService.getClientType());
|
||||
request.headers.set(
|
||||
"Bitwarden-Client-Version",
|
||||
await this.platformUtilsService.getApplicationVersion()
|
||||
await this.platformUtilsService.getApplicationVersionNumber()
|
||||
);
|
||||
return this.nativeFetch(request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user