Skip to content

Commit

Permalink
Removed redundant properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunoyu committed Feb 6, 2025
1 parent b158dc8 commit 113ec42
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions dist/well-known.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,12 @@ return Promise.all([
let result = {
provider_urls: Array.isArray(data.provider_urls) && data.provider_urls.length > 0 ? data.provider_urls : [],
accounts_endpoint: data.accounts_endpoint || null,
login_url: data.login_url || null,
valid: Array.isArray(data.provider_urls) && data.provider_urls.length > 0
login_url: data.login_url || null
};
return result;
}).catch(error => {
return {
error: `Failed to parse JSON: ${error.message}`,
valid: false
error: `Failed to parse JSON: ${error.message}`
};
});
}),
Expand All @@ -138,29 +136,25 @@ return Promise.all([
return r.json().then(data => {
let result = {
enroll: data.enroll || null,
manage: data.manage || null,
valid: typeof data.enroll === 'string' && typeof data.manage === 'string'
manage: data.manage || null
};
return result;
}).catch(error => {
return {
error: `Failed to parse JSON: ${error.message}`,
valid: false
error: `Failed to parse JSON: ${error.message}`
};
});
}),
// Related Origin Requests
parseResponse('/.well-known/webauthn', r => {
return r.json().then(data => {
let result = {
origins: Array.isArray(data.origins) && data.origins.length > 0 ? data.origins : [],
valid: Array.isArray(data.origins) && data.origins.length > 0
origins: Array.isArray(data.origins) && data.origins.length > 0 ? data.origins : []
};
return result;
}).catch(error => {
return {
error: `Failed to parse JSON: ${error.message}`,
valid: false
error: `Failed to parse JSON: ${error.message}`
};
});
}),
Expand Down

0 comments on commit 113ec42

Please sign in to comment.