mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Format stuff
This commit is contained in:
parent
30bf2d9207
commit
b16c2374c4
@ -12,9 +12,9 @@ import {
|
||||
uuid,
|
||||
varchar,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { image, language, schema } from "./utils";
|
||||
import { entries } from "./entries";
|
||||
import { seasons } from "./seasons";
|
||||
import { image, language, schema } from "./utils";
|
||||
|
||||
export const showKind = schema.enum("show_kind", ["serie", "movie"]);
|
||||
export const showStatus = schema.enum("show_status", [
|
||||
|
@ -71,7 +71,7 @@ export function sqlarr(array: unknown[]) {
|
||||
return `{${array.map((item) => `"${item}"`).join(",")}}`;
|
||||
}
|
||||
|
||||
// TODO: upstream this
|
||||
// See https://github.com/drizzle-team/drizzle-orm/issues/4044
|
||||
// TODO: type values (everything is a `text` for now)
|
||||
export function values(items: Record<string, unknown>[]) {
|
||||
const [firstProp, ...props] = Object.keys(items[0]);
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { t } from "elysia";
|
||||
import {
|
||||
Episode,
|
||||
SeedEpisode,
|
||||
MovieEntry,
|
||||
SeedEpisode,
|
||||
SeedMovieEntry,
|
||||
Special,
|
||||
SeedSpecial,
|
||||
Special,
|
||||
} from "../entry";
|
||||
|
||||
export const Entry = t.Union([Episode, MovieEntry, Special]);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { t } from "elysia";
|
||||
import { comment } from "../../utils";
|
||||
import { BaseEntry, EntryTranslation } from "./base-entry";
|
||||
import { EpisodeId, Resource, SeedImage, TranslationRecord } from "../utils";
|
||||
import { BaseEntry, EntryTranslation } from "./base-entry";
|
||||
|
||||
export const BaseSpecial = t.Intersect(
|
||||
[
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { t } from "elysia";
|
||||
import { bubbleImages, madeInAbyss, registerExamples } from "./examples";
|
||||
import { SeasonId } from "./utils/external-id";
|
||||
import { Image, SeedImage } from "./utils/image";
|
||||
import { TranslationRecord } from "./utils/language";
|
||||
import { Resource } from "./utils/resource";
|
||||
import { bubbleImages, madeInAbyss, registerExamples } from "./examples";
|
||||
|
||||
export const BaseSeason = t.Object({
|
||||
seasonNumber: t.Number({ minimum: 1 }),
|
||||
|
@ -8,7 +8,7 @@ import { dune1984 } from "~/models/examples/dune-1984";
|
||||
import { dune } from "~/models/examples/dune-2021";
|
||||
import type { Movie } from "~/models/movie";
|
||||
import { isUuid } from "~/models/utils";
|
||||
import { getMovies, app } from "../helpers";
|
||||
import { app, getMovies } from "../helpers";
|
||||
|
||||
beforeAll(async () => {
|
||||
await db.delete(shows);
|
||||
|
Loading…
x
Reference in New Issue
Block a user