From 78288b8faca5d0896de8037f71e535f5c15a6482 Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 27 Apr 2024 22:44:25 +0600 Subject: [PATCH] core/api: don't trigger verifyStream on premature probe --- src/core/api.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/api.js b/src/core/api.js index 9dd4b1cc..c7e06284 100644 --- a/src/core/api.js +++ b/src/core/api.js @@ -131,14 +131,14 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) { const checkBaseLength = q.t.length === 21 && q.e.length === 13; const checkSafeLength = q.h.length === 43 && q.s.length === 43 && q.i.length === 22; if (checkQueries && checkBaseLength && checkSafeLength) { - let streamInfo = verifyStream(q.t, q.h, q.e, q.s, q.i); - if (streamInfo.error) { - return res.status(streamInfo.status).json(apiJSON(0, { t: streamInfo.error }).body); - } if (q.p) { return res.status(200).json({ status: "continue" - }); + }) + } + let streamInfo = verifyStream(q.t, q.h, q.e, q.s, q.i); + if (streamInfo.error) { + return res.status(streamInfo.status).json(apiJSON(0, { t: streamInfo.error }).body); } return stream(res, streamInfo); }