refactor(handler): remove unnecessary Promise.resolve() usage
This commit is contained in:
parent
072ec4ac0a
commit
4cde8607cd
2 changed files with 3 additions and 3 deletions
|
|
@ -23,14 +23,14 @@ export class KinoKiste implements Handler {
|
|||
|
||||
readonly handle = async (ctx: Context, id: string) => {
|
||||
if (!id.startsWith('tt')) {
|
||||
return Promise.resolve([]);
|
||||
return [];
|
||||
}
|
||||
|
||||
const imdbId = parseImdbId(id);
|
||||
|
||||
const seriesPageUrl = await this.fetchSeriesPageUrl(ctx, imdbId);
|
||||
if (!seriesPageUrl) {
|
||||
return Promise.resolve([]);
|
||||
return [];
|
||||
}
|
||||
|
||||
const html = await this.fetcher.text(ctx, seriesPageUrl);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export class MeineCloud implements Handler {
|
|||
|
||||
readonly handle = async (ctx: Context, id: string) => {
|
||||
if (!id.startsWith('tt')) {
|
||||
return Promise.resolve([]);
|
||||
return [];
|
||||
}
|
||||
|
||||
const html = await this.fetcher.text(ctx, new URL(`https://meinecloud.click/movie/${parseImdbId(id).id}`));
|
||||
|
|
|
|||
Loading…
Reference in a new issue