Remove the option to create videos from post /movies

This commit is contained in:
Zoe Roux 2024-11-24 23:27:06 +01:00
parent b63391d744
commit 1309749e46
No known key found for this signature in database
4 changed files with 18 additions and 17 deletions

View File

@ -1,4 +1,15 @@
import type { SeedMovie } from "../movie";
import type { Video } from "../video";
export const bubbleVideo: Video = {
id: "3cd436ee-01ff-4f45-ba98-62aabeb22f25",
slug: "bubble",
path: "/video/Bubble/Bubble (2022).mkv",
rendering: "459429fa062adeebedcc2bb04b9965de0262bfa453369783132d261be79021bd",
part: null,
version: 1,
createdAt: "2024-11-23T15:01:24.968Z",
};
export const bubble: SeedMovie = {
slug: "bubble",
@ -35,15 +46,7 @@ export const bubble: SeedMovie = {
link: "https://www.imdb.com/title/tt16360006",
},
},
videos: [
{
path: "/video/Bubble/Bubble (2022).mkv",
rendering:
"459429fa062adeebedcc2bb04b9965de0262bfa453369783132d261be79021bd",
part: null,
version: 1,
},
],
videos: [bubbleVideo.id],
};
export const bubbleImages = {

View File

@ -30,5 +30,5 @@ export const registerExamples = <T extends TSchema>(
}
};
export { bubble } from "./bubble";
export { madeInAbyss } from "./made-in-abyss";
export * from "./bubble";
export * from "./made-in-abyss";

View File

@ -66,7 +66,7 @@ export const SeedMovie = t.Intersect([
minProperties: 1,
},
),
videos: t.Optional(t.Array(SeedVideo)),
videos: t.Optional(t.Array(t.String({ format: "uuid" }))),
}),
]);
export type SeedMovie = typeof SeedMovie.static;

View File

@ -1,5 +1,6 @@
import { t } from "elysia";
import { comment } from "../utils";
import { registerExamples, bubbleVideo } from "./examples";
export const Video = t.Object({
id: t.String({ format: "uuid" }),
@ -31,10 +32,7 @@ export const Video = t.Object({
createdAt: t.String({ format: "date-time" }),
});
export type Video = typeof Video.static;
registerExamples(Video, bubbleVideo);
export const SeedVideo = t.Union([
t.Omit(Video, ["id", "slug", "createdAt"]),
t.String({ format: "uuid" }),
]);
export const SeedVideo = t.Omit(Video, ["id", "slug", "createdAt"]);