Run prettier

This commit is contained in:
Yarmo Mackenbach 2021-04-22 16:00:37 +02:00
parent bbec25c657
commit f781458a2f
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1
8 changed files with 19 additions and 19 deletions

View file

@ -1,18 +1,13 @@
{ {
"plugins": ["plugins/markdown"], "plugins": ["plugins/markdown"],
"source": { "source": {
"include": [ "include": ["./src", "./README.md"]
"./src",
"./README.md"
]
}, },
"recurseDepth": 2, "recurseDepth": 2,
"templates": { "templates": {
"default": { "default": {
"staticFiles": { "staticFiles": {
"include": [ "include": ["./static"]
"./static"
]
} }
} }
}, },

View file

@ -34,7 +34,7 @@ const Claim = require('./claim')
* const key1 = doip.keys.fetchHKP('alice@domain.tld'); * const key1 = doip.keys.fetchHKP('alice@domain.tld');
* const key2 = doip.keys.fetchHKP('123abc123abc'); * const key2 = doip.keys.fetchHKP('123abc123abc');
*/ */
exports.fetchHKP = (identifier, keyserverDomain) => { exports.fetchHKP = (identifier, keyserverDomain) => {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const keyserverBaseUrl = keyserverDomain const keyserverBaseUrl = keyserverDomain
? `https://${keyserverDomain}` ? `https://${keyserverDomain}`
@ -187,14 +187,19 @@ exports.fetchURI = (uri) => {
switch (match[1]) { switch (match[1]) {
case 'hkp': case 'hkp':
resolve( 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 break
case 'wkd': case 'wkd':
resolve(exports.fetchWKD(match[2])) resolve(exports.fetchWKD(match[2]))
break break
case 'kb': 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 break
default: default:
reject('Invalid URI protocol') reject('Invalid URI protocol')