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

Apply fixes from CodeFactor
pull/74/head
Millennium Earl 2021-03-04 10:47:05 +01:00 committed by GitHub
commit a3cb6ab416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 104 additions and 104 deletions

View File

@ -137,7 +137,7 @@ export async function searchHandiwork<T extends IBasic>(query: HandiworkSearchQu
// Check if the user is logged
if (!shared.isLogged) throw new UserNotLogged(USER_NOT_LOGGED);
return await search<T>(query, limit);
return search<T>(query, limit);
};
/**
@ -155,7 +155,7 @@ export async function getHandiworkFromURL<T extends IBasic>(url: string): Promis
if (!isF95URL(url)) throw new Error(`${url} is not a valid F95Zone URL`);
// Get game data
return await getHandiworkInformation<T>(url);
return getHandiworkInformation<T>(url);
};
/**
@ -196,7 +196,7 @@ export async function getLatestUpdates<T extends IBasic>(query: LatestSearchQuer
// Get the data from urls
const promiseList = urls.map((u: string) => getHandiworkInformation<T>(u));
return await Promise.all(promiseList);
return Promise.all(promiseList);
};
//#endregion

View File

@ -149,7 +149,7 @@ export default class UserProfile extends PlatformUser {
}
// Wait for the promises to resolve
return await Promise.all(responsePromiseList);
return Promise.all(responsePromiseList);
}
/**

View File

@ -74,7 +74,7 @@ export default class LatestSearchQuery implements IQuery {
const decoded = decodeURIComponent(url.toString());
// Fetch the result
return await fetchGETResponse(decoded);
return fetchGETResponse(decoded);
}
public findNearestDate(d: Date): TDate {

View File

@ -82,7 +82,7 @@ export default class ThreadSearchQuery implements IQuery {
const params = this.preparePOSTParameters();
// Return the POST response
return await fetchPOSTResponse(urls.F95_SEARCH_URL, params);
return fetchPOSTResponse(urls.F95_SEARCH_URL, params);
}
//#endregion Public methods

View File

@ -36,6 +36,6 @@ export default async function executeQuery(query: any, limit: number = 30): Prom
"handiwork");
// Fetch and return the urls
return await searchMap[key](query, limit);
return searchMap[key](query, limit);
}
//#endregion

View File

@ -25,7 +25,7 @@ export default async function fetchThreadHandiworkURLs(query: ThreadSearchQuery,
const response = await query.execute();
// Fetch the results from F95 and return the handiwork urls
if (response.isSuccess()) return await fetchResultURLs(response.value.data as string, limit);
if (response.isSuccess()) return fetchResultURLs(response.value.data as string, limit);
else throw response.value
}