feat: enhance creation of recommendation keywords

This commit is contained in:
2023-09-08 14:01:35 +02:00
parent cc112b7554
commit 217dce04fb
5 changed files with 58 additions and 35 deletions

View File

@ -54,7 +54,9 @@ const POST = async (
movie.tags = [
...new Set([
...movie.tags.map((g) => g.toLowerCase()),
...movieDetails.genres.map((g) => g.name?.toLowerCase()),
...movieDetails.genres.map((g) =>
g.name?.toLowerCase().replaceAll(" ", "-")
),
].filter(isString)),
];
}