mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39:28 -07:00
Run prettier
This commit is contained in:
parent
bbec25c657
commit
f781458a2f
8 changed files with 19 additions and 19 deletions
|
@ -1,18 +1,13 @@
|
|||
{
|
||||
"plugins": ["plugins/markdown"],
|
||||
"source": {
|
||||
"include": [
|
||||
"./src",
|
||||
"./README.md"
|
||||
]
|
||||
"include": ["./src", "./README.md"]
|
||||
},
|
||||
"recurseDepth": 2,
|
||||
"templates": {
|
||||
"default": {
|
||||
"staticFiles": {
|
||||
"include": [
|
||||
"./static"
|
||||
]
|
||||
"include": ["./static"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
11
src/keys.js
11
src/keys.js
|
@ -34,7 +34,7 @@ const Claim = require('./claim')
|
|||
* const key1 = doip.keys.fetchHKP('alice@domain.tld');
|
||||
* const key2 = doip.keys.fetchHKP('123abc123abc');
|
||||
*/
|
||||
exports.fetchHKP = (identifier, keyserverDomain) => {
|
||||
exports.fetchHKP = (identifier, keyserverDomain) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const keyserverBaseUrl = keyserverDomain
|
||||
? `https://${keyserverDomain}`
|
||||
|
@ -187,14 +187,19 @@ exports.fetchURI = (uri) => {
|
|||
switch (match[1]) {
|
||||
case 'hkp':
|
||||
resolve(
|
||||
exports.fetchHKP(match[3] ? match[3] : match[2], match[3] ? match[2] : null)
|
||||
exports.fetchHKP(
|
||||
match[3] ? match[3] : match[2],
|
||||
match[3] ? match[2] : null
|
||||
)
|
||||
)
|
||||
break
|
||||
case 'wkd':
|
||||
resolve(exports.fetchWKD(match[2]))
|
||||
break
|
||||
case 'kb':
|
||||
resolve(exports.fetchKeybase(match[2], match.length >= 4 ? match[3] : null))
|
||||
resolve(
|
||||
exports.fetchKeybase(match[2], match.length >= 4 ? match[3] : null)
|
||||
)
|
||||
break
|
||||
default:
|
||||
reject('Invalid URI protocol')
|
||||
|
|
Loading…
Reference in a new issue