From 0435a2222340a9af8458e11ef8d90271b5157f1a Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Mon, 1 Jul 2024 09:40:05 +1000 Subject: [PATCH] fix: return value --- services/api/src/routes/keys.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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];