mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-22 15:12:28 -04:00
Add staff migrations & basic tests
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type { StaticDecode } from "@sinclair/typebox";
|
||||
import { type SQL, and, eq, ne, sql } from "drizzle-orm";
|
||||
import { Elysia, t } from "elysia";
|
||||
import { db } from "~/db";
|
||||
@@ -105,7 +104,7 @@ async function getEntries({
|
||||
after: string | undefined;
|
||||
limit: number;
|
||||
query: string | undefined;
|
||||
sort: StaticDecode<typeof entrySort>;
|
||||
sort: Sort;
|
||||
filter: SQL | undefined;
|
||||
languages: string[];
|
||||
}): Promise<(Entry | Extra | UnknownEntry)[]> {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { StaticDecode } from "@sinclair/typebox";
|
||||
import { type SQL, and, eq, exists, sql } from "drizzle-orm";
|
||||
import { db } from "~/db";
|
||||
import {
|
||||
@@ -159,7 +158,7 @@ export async function getShows({
|
||||
after?: string;
|
||||
limit: number;
|
||||
query?: string;
|
||||
sort?: StaticDecode<typeof showSort>;
|
||||
sort?: Sort;
|
||||
filter?: SQL;
|
||||
languages: string[];
|
||||
fallbackLanguage?: boolean;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { StaticDecode } from "@sinclair/typebox";
|
||||
import { type SQL, and, eq, sql } from "drizzle-orm";
|
||||
import Elysia, { t } from "elysia";
|
||||
import { db } from "~/db";
|
||||
@@ -82,7 +81,7 @@ async function getStaffRoles({
|
||||
after?: string;
|
||||
limit: number;
|
||||
query?: string;
|
||||
sort?: StaticDecode<typeof staffRoleSort>;
|
||||
sort?: Sort;
|
||||
filter?: SQL;
|
||||
}) {
|
||||
return await db
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { StaticDecode } from "@sinclair/typebox";
|
||||
import { type SQL, and, eq, exists, sql } from "drizzle-orm";
|
||||
import Elysia, { t } from "elysia";
|
||||
import { db } from "~/db";
|
||||
@@ -74,7 +73,7 @@ export async function getStudios({
|
||||
after?: string;
|
||||
limit: number;
|
||||
query?: string;
|
||||
sort?: StaticDecode<typeof studioSort>;
|
||||
sort?: Sort,
|
||||
filter?: SQL;
|
||||
languages: string[];
|
||||
fallbackLanguage?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user