Skip to content

Commit

Permalink
core/api: don't trigger verifyStream on premature probe
Browse files Browse the repository at this point in the history
  • Loading branch information
wukko committed Apr 27, 2024
1 parent 70a79fd commit 78288b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 78288b8

Please sign in to comment.