[CodeFactor] Apply fixes
parent
75345718be
commit
f29c1d91b8
|
@ -7,7 +7,7 @@ import { urls } from "../constants/url.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the URLs of the latest handiworks that match the passed parameters.
|
* Gets the URLs of the latest handiworks that match the passed parameters.
|
||||||
*
|
*
|
||||||
* You *must* be logged.
|
* You *must* be logged.
|
||||||
* @param {LatestSearchQuery} query
|
* @param {LatestSearchQuery} query
|
||||||
* Query used for the search
|
* Query used for the search
|
||||||
|
|
|
@ -19,11 +19,11 @@ import { IQuery } from "../interfaces.js";
|
||||||
export default async function getURLsFromQuery(query: IQuery, limit: number = 30): Promise<string[]> {
|
export default async function getURLsFromQuery(query: IQuery, limit: number = 30): Promise<string[]> {
|
||||||
switch (query.itype) {
|
switch (query.itype) {
|
||||||
case "HandiworkSearchQuery":
|
case "HandiworkSearchQuery":
|
||||||
return await fetchHandiworkURLs(query as HandiworkSearchQuery, limit);
|
return fetchHandiworkURLs(query as HandiworkSearchQuery, limit);
|
||||||
case "LatestSearchQuery":
|
case "LatestSearchQuery":
|
||||||
return await fetchLatestHandiworkURLs(query as LatestSearchQuery, limit);
|
return fetchLatestHandiworkURLs(query as LatestSearchQuery, limit);
|
||||||
case "ThreadSearchQuery":
|
case "ThreadSearchQuery":
|
||||||
return await fetchThreadHandiworkURLs(query as ThreadSearchQuery, limit);
|
return fetchThreadHandiworkURLs(query as ThreadSearchQuery, limit);
|
||||||
default:
|
default:
|
||||||
throw Error(`Invalid query type: ${query.itype}`);
|
throw Error(`Invalid query type: ${query.itype}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue