refactor(handler): remove unnecessary Promise.resolve() usage

This commit is contained in:
WebStreamr 2025-05-12 12:58:36 +00:00
parent 072ec4ac0a
commit 4cde8607cd
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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}`));