Merge pull request #75 from MillenniumEarl/2.0.0-ts-cf-autofix

Apply fixes from CodeFactor
pull/81/head
Millennium Earl 2021-03-04 11:59:37 +01:00 committed by GitHub
commit ee04f70ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import { urls } from "../constants/url.js";
/**
* Gets the URLs of the latest handiworks that match the passed parameters.
*
*
* You *must* be logged.
* @param {LatestSearchQuery} query
* Query used for the search

View File

@ -19,11 +19,11 @@ import { IQuery } from "../interfaces.js";
export default async function getURLsFromQuery(query: IQuery, limit: number = 30): Promise<string[]> {
switch (query.itype) {
case "HandiworkSearchQuery":
return await fetchHandiworkURLs(query as HandiworkSearchQuery, limit);
return fetchHandiworkURLs(query as HandiworkSearchQuery, limit);
case "LatestSearchQuery":
return await fetchLatestHandiworkURLs(query as LatestSearchQuery, limit);
return fetchLatestHandiworkURLs(query as LatestSearchQuery, limit);
case "ThreadSearchQuery":
return await fetchThreadHandiworkURLs(query as ThreadSearchQuery, limit);
return fetchThreadHandiworkURLs(query as ThreadSearchQuery, limit);
default:
throw Error(`Invalid query type: ${query.itype}`);
}