fix: remove all linter errors

This commit is contained in:
Max Richter
2026-01-10 15:06:43 +01:00
parent e55f787a29
commit 694feb083d
20 changed files with 206 additions and 593 deletions

View File

@@ -1,4 +1,5 @@
import * as openai from "@lib/openai.ts";
import { type MovieRecommendation } from "@lib/openai.ts";
import * as tmdb from "@lib/tmdb.ts";
import { parseRating } from "@lib/helpers.ts";
import { createCache } from "@lib/cache.ts";
@@ -83,10 +84,12 @@ export async function getSimilarMovies(id: string) {
);
if (!recommendations) return;
const movies = await Promise.all(recommendations.map(async (rec) => {
const m = await tmdb.searchMovie(rec.title, rec.year);
return m?.results?.[0];
}));
const movies = await Promise.all(
recommendations.map(async (rec: MovieRecommendation) => {
const m = await tmdb.searchMovie(rec.title, rec.year);
return m?.results?.[0];
}),
);
return movies.filter(Boolean);
}