Add staff migrations & basic tests

This commit is contained in:
Zoe Roux
2025-03-10 11:29:12 +01:00
parent 25f042fbd7
commit e3a537896a
10 changed files with 1596 additions and 8 deletions
+1 -2
View File
@@ -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 -2
View File
@@ -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 -2
View File
@@ -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 -2
View File
@@ -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;