diff --git a/services/api/src/routes/keys.ts b/services/api/src/routes/keys.ts index 69f7a460ef..a4ba09bd00 100644 --- a/services/api/src/routes/keys.ts +++ b/services/api/src/routes/keys.ts @@ -55,7 +55,7 @@ const keysRoute = async ( const fingerprintKeyMap = await mapFingerprints(keys) const found = fingerprintKeyMap.filter(el => {if (el.fingerprint === fingerprint) { return el.key }}); - if (found) { + if (!found) { logger.debug(`Unknown fingerprint: ${fingerprint}`); } @@ -81,7 +81,7 @@ const keysRoute = async ( ); } - res.send(found[0].key); + res.send(foundkey[0].key); }; export default [bodyParser.json(), keysRoute];