mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fix seed entries type
This commit is contained in:
parent
0939289e2c
commit
2510420cea
@ -1,6 +1,6 @@
|
|||||||
import { t } from "elysia";
|
import { t } from "elysia";
|
||||||
|
import { EpisodeId, Resource, SeedImage, TranslationRecord } from "../utils";
|
||||||
import { BaseEntry, EntryTranslation } from "./base-entry";
|
import { BaseEntry, EntryTranslation } from "./base-entry";
|
||||||
import { EpisodeId, SeedImage, TranslationRecord, Resource } from "../utils";
|
|
||||||
|
|
||||||
export const BaseEpisode = t.Intersect([
|
export const BaseEpisode = t.Intersect([
|
||||||
BaseEntry,
|
BaseEntry,
|
||||||
@ -17,8 +17,7 @@ export const Episode = t.Intersect([Resource(), BaseEpisode, EntryTranslation]);
|
|||||||
export type Episode = typeof Episode.static;
|
export type Episode = typeof Episode.static;
|
||||||
|
|
||||||
export const SeedEpisode = t.Intersect([
|
export const SeedEpisode = t.Intersect([
|
||||||
BaseEpisode,
|
t.Omit(BaseEpisode, ["thumbnail", "createdAt", "nextRefresh"]),
|
||||||
t.Omit(BaseEntry, ["thumbnail", "createdAt", "nextRefresh"]),
|
|
||||||
t.Object({
|
t.Object({
|
||||||
thumbnail: t.Nullable(SeedImage),
|
thumbnail: t.Nullable(SeedImage),
|
||||||
translations: TranslationRecord(EntryTranslation),
|
translations: TranslationRecord(EntryTranslation),
|
||||||
|
@ -45,8 +45,7 @@ export const MovieEntry = t.Intersect([
|
|||||||
export type MovieEntry = typeof MovieEntry.static;
|
export type MovieEntry = typeof MovieEntry.static;
|
||||||
|
|
||||||
export const SeedMovieEntry = t.Intersect([
|
export const SeedMovieEntry = t.Intersect([
|
||||||
BaseMovieEntry,
|
t.Omit(BaseMovieEntry, ["thumbnail", "createdAt", "nextRefresh"]),
|
||||||
t.Omit(BaseEntry, ["thumbnail", "createdAt", "nextRefresh"]),
|
|
||||||
t.Object({
|
t.Object({
|
||||||
thumbnail: t.Nullable(SeedImage),
|
thumbnail: t.Nullable(SeedImage),
|
||||||
translations: TranslationRecord(
|
translations: TranslationRecord(
|
||||||
|
@ -28,8 +28,7 @@ export const Special = t.Intersect([Resource(), BaseSpecial, EntryTranslation]);
|
|||||||
export type Special = typeof Special.static;
|
export type Special = typeof Special.static;
|
||||||
|
|
||||||
export const SeedSpecial = t.Intersect([
|
export const SeedSpecial = t.Intersect([
|
||||||
BaseSpecial,
|
t.Omit(BaseSpecial, ["thumbnail", "createdAt", "nextRefresh"]),
|
||||||
t.Omit(BaseEntry, ["thumbnail", "createdAt", "nextRefresh"]),
|
|
||||||
t.Object({
|
t.Object({
|
||||||
thumbnail: t.Nullable(SeedImage),
|
thumbnail: t.Nullable(SeedImage),
|
||||||
translations: TranslationRecord(EntryTranslation),
|
translations: TranslationRecord(EntryTranslation),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user