Fix bloated response

This commit is contained in:
Yarmo Mackenbach 2021-05-04 13:20:25 +02:00
parent 3a999cccc8
commit c747d39c7d
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -37,6 +37,7 @@ const generateWKDProfile = async (id) => {
let keyData = await doip.keys.process(key.publicKey) let keyData = await doip.keys.process(key.publicKey)
keyData.key.fetchMethod = 'wkd' keyData.key.fetchMethod = 'wkd'
keyData.key.uri = key.fetchURL keyData.key.uri = key.fetchURL
keyData.key.data = null
keyData = processKeyData(keyData) keyData = processKeyData(keyData)
return { return {
@ -62,6 +63,7 @@ const generateHKPProfile = async (id, keyserverDomain) => {
let keyData = await doip.keys.process(key.publicKey) let keyData = await doip.keys.process(key.publicKey)
keyData.key.fetchMethod = 'hkp' keyData.key.fetchMethod = 'hkp'
keyData.key.uri = key.fetchURL keyData.key.uri = key.fetchURL
keyData.key.data = null
keyData = processKeyData(keyData) keyData = processKeyData(keyData)
return { return {
@ -86,6 +88,7 @@ const generateSignatureProfile = async (signature) => {
.then(async key => { .then(async key => {
let keyData = key.keyData let keyData = key.keyData
delete key.keyData delete key.keyData
keyData.key.data = null
keyData = processKeyData(keyData) keyData = processKeyData(keyData)
return { return {
@ -111,6 +114,7 @@ const generateKeybaseProfile = async (username, fingerprint) => {
let keyData = await doip.keys.process(key.publicKey) let keyData = await doip.keys.process(key.publicKey)
keyData.key.fetchMethod = 'hkp' keyData.key.fetchMethod = 'hkp'
keyData.key.uri = key.fetchURL keyData.key.uri = key.fetchURL
keyData.key.data = null
keyData = processKeyData(keyData) keyData = processKeyData(keyData)
return { return {