mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-22 15:12:28 -04:00
Fix type issues
This commit is contained in:
@@ -157,7 +157,7 @@ export const mapProgress = ({ aliased }: { aliased: boolean }) => {
|
||||
const ret = {
|
||||
time: coalesce(time, sql<number>`0`),
|
||||
percent: coalesce(percent, sql<number>`0`),
|
||||
playedDate: sql`to_char(${playedDate}, 'YYYY-MM-DD"T"HH24:MI:SS"Z"')`,
|
||||
playedDate: sql<string>`to_char(${playedDate}, 'YYYY-MM-DD"T"HH24:MI:SS"Z"')`,
|
||||
videoId: sql<string>`${videoId}`,
|
||||
};
|
||||
if (!aliased) return ret;
|
||||
|
||||
@@ -27,9 +27,9 @@ function getRedirectToImageHandler({ filter }: { filter?: SQL }) {
|
||||
status,
|
||||
redirect,
|
||||
}: {
|
||||
params: { id: string; image: "poster" | "thumbnail" | "banner" | "logo" };
|
||||
params: { id?: string; image: "poster" | "thumbnail" | "banner" | "logo" };
|
||||
headers: { "accept-language": string };
|
||||
query: { quality: "high" | "medium" | "low" };
|
||||
query: { quality?: "high" | "medium" | "low" };
|
||||
set: Context["set"];
|
||||
status: Context["status"];
|
||||
redirect: Context["redirect"];
|
||||
@@ -212,12 +212,9 @@ export const imagesH = new Elysia({ tags: ["images"] })
|
||||
},
|
||||
)
|
||||
.guard({
|
||||
headers: t.Object(
|
||||
{
|
||||
"accept-language": AcceptLanguage(),
|
||||
},
|
||||
{ additionalProperties: true },
|
||||
),
|
||||
headers: t.Object({
|
||||
"accept-language": AcceptLanguage(),
|
||||
}),
|
||||
})
|
||||
.get(
|
||||
"/studios/:id/logo",
|
||||
@@ -307,6 +304,9 @@ export const imagesH = new Elysia({ tags: ["images"] })
|
||||
description: "The type of image to retrive.",
|
||||
}),
|
||||
}),
|
||||
headers: t.Object({
|
||||
"accept-language": AcceptLanguage(),
|
||||
}),
|
||||
})
|
||||
.get(
|
||||
"/movies/:id/:image",
|
||||
|
||||
@@ -2,7 +2,7 @@ import { db } from "~/db";
|
||||
import { showStudioJoin, studios, studioTranslations } from "~/db/schema";
|
||||
import { conflictUpdateAllExcept } from "~/db/utils";
|
||||
import type { SeedStudio } from "~/models/studio";
|
||||
import { enqueueOptImage, flushImageQueue, ImageTask } from "../images";
|
||||
import { enqueueOptImage, flushImageQueue, type ImageTask } from "../images";
|
||||
|
||||
type StudioI = typeof studios.$inferInsert;
|
||||
type StudioTransI = typeof studioTranslations.$inferInsert;
|
||||
|
||||
Reference in New Issue
Block a user