fix: pass missing id to several create things

This commit is contained in:
2023-08-17 00:00:05 +02:00
parent 5ee7adbd0a
commit b4d4e07b85
5 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ export const handler: Handlers = {
if (finalPath) {
metadata.image = finalPath;
}
if (director) {
if (director?.name) {
metadata.author = director.name;
}
@ -70,7 +70,7 @@ export const handler: Handlers = {
meta: metadata,
};
await createMovie(movie);
await createMovie(name, movie);
return json(movie);
},

View File

@ -68,7 +68,7 @@ const POST = async (
movie.meta.image = finalPath;
}
await createMovie(movie);
await createMovie(movie.id, movie);
cache.del(`documents:Media:movies:${name}.md`);