Make movie get work

This commit is contained in:
Zoe Roux
2024-12-15 18:28:05 +01:00
parent 9e1afca9ec
commit eea0f688a0
4 changed files with 126 additions and 53 deletions
+4
View File
@@ -1,4 +1,5 @@
import { FormatRegistry } from "@sinclair/typebox";
import { TypeCompiler } from "@sinclair/typebox/compiler";
import { t } from "elysia";
export const slugPattern = "^[a-z0-9-]+$";
@@ -11,3 +12,6 @@ export const Resource = t.Object({
id: t.String({ format: "uuid" }),
slug: t.String({ format: "slug" }),
});
const checker = TypeCompiler.Compile(t.String({ format: "uuid" }));
export const isUuid = (id: string) => checker.Check(id);