Skip to content

Commit

Permalink
Merge pull request #373 from Vankerkom/remove-unused-code
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
soruly authored Oct 20, 2024
2 parents 7238941 + d098d9e commit 9920288
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default async (req, res) => {
].includes(new URL(req.query.url).hostname)
? `https://trace.moe/image-proxy?url=${encodeURIComponent(req.query.url)}`
: req.query.url,
).catch((e) => {
).catch((_) => {
return { status: 400 };
});
if (response.status >= 400) {
Expand Down Expand Up @@ -350,8 +350,6 @@ export default async (req, res) => {

let result = [];
let frameCountList = [];
let rawDocsSearchTimeList = [];
let reRankSearchTimeList = [];

if (solrResults.find((e) => e.Error)) {
console.log(solrResults.find((e) => e.Error));
Expand All @@ -361,10 +359,8 @@ export default async (req, res) => {
});
}

for (const { RawDocsCount, RawDocsSearchTime, ReRankSearchTime, response } of solrResults) {
for (const { RawDocsCount, response } of solrResults) {
frameCountList.push(Number(RawDocsCount));
rawDocsSearchTimeList.push(Number(RawDocsSearchTime));
reRankSearchTimeList.push(Number(ReRankSearchTime));
result = result.concat(response.docs);
}

Expand Down

0 comments on commit 9920288

Please # to comment.