WebAPI.getProfileURL: Use profileKeyVersion by itself if we have it

This commit is contained in:
Scott Nonnenberg 2020-08-10 12:39:06 -07:00 committed by GitHub
parent 6a68b37c83
commit 0fee1f9935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -914,11 +914,16 @@ export function initialize({
profileKeyVersion?: string,
profileKeyCredentialRequest?: string
) {
let profileUrl = `/${identifier}`;
if (profileKeyVersion) {
profileUrl += `/${profileKeyVersion}`;
}
if (profileKeyVersion && profileKeyCredentialRequest) {
return `/${identifier}/${profileKeyVersion}/${profileKeyCredentialRequest}`;
profileUrl += `/${profileKeyCredentialRequest}`;
}
return `/${identifier}`;
return profileUrl;
}
async function getProfile(