Store image id instead of low/middle/high uri

This commit is contained in:
Zoe Roux 2024-11-08 22:27:58 +01:00
parent 00774230af
commit f53e8e3611
No known key found for this signature in database
2 changed files with 2 additions and 4 deletions

View File

@ -5,7 +5,7 @@ export const schema = pgSchema("kyoo");
export const language = () => varchar({ length: 255 });
export const image = () =>
jsonb().$type<{ source: string; blurhash: string }>();
jsonb().$type<{ id: string; source: string; blurhash: string }>();
export const externalid = () =>
jsonb()

View File

@ -1,10 +1,8 @@
import { t } from "elysia";
export const Image = t.Object({
id: t.String({ format: "uuid" }),
source: t.String({ format: "uri" }),
blurhash: t.String(),
low: t.String({ format: "uri" }),
medium: t.String({ format: "uri" }),
high: t.String({ format: "uri" }),
});
export type Image = typeof Image.static;