From dbf653e7cd70466fa9622349f83dc7bbf24ec86d Mon Sep 17 00:00:00 2001 From: Charlotte Som Date: Sat, 7 Jun 2025 11:34:01 +0100 Subject: [PATCH] brevity --- client/viewer.tsx | 6 +++--- common/lexicons.ts | 26 +++++--------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/client/viewer.tsx b/client/viewer.tsx index f9bd5ba..ac87e20 100644 --- a/client/viewer.tsx +++ b/client/viewer.tsx @@ -33,13 +33,13 @@ const fetchVideoRecord = async ( }; const resolveVideoURL = async ( - did: `did:${string}`, + repo: `did:${string}`, blob: string ): Promise => { - const xrpc = new XRPC(globalThis.location.href); try { + const xrpc = new XRPC(globalThis.location.href); const res = await xrpc.call("blue.cerulea.video.fetchVideo", { - input: { repo: did, blob }, + input: { repo, blob }, }); return `/user-content/${res.filename}`; } catch { diff --git a/common/lexicons.ts b/common/lexicons.ts index c560e97..fb9e114 100644 --- a/common/lexicons.ts +++ b/common/lexicons.ts @@ -16,14 +16,8 @@ export const videoLexicon = { accept: ["video/mp4", "video/webm"], maxSize: 536870912, }, - title: { - type: "string", - maxGraphemes: 300, - maxLength: 3000, - }, - description: { - type: "string", - }, + title: { type: "string", maxGraphemes: 300, maxLength: 3000 }, + description: { type: "string" }, }, }, }, @@ -42,14 +36,8 @@ export const fetchVideoLexicon = { type: "object", required: ["repo", "blob"], properties: { - repo: { - type: "string", - format: "did", - }, - blob: { - type: "string", - format: "cid", - }, + repo: { type: "string", format: "did" }, + blob: { type: "string", format: "cid" }, }, }, }, @@ -58,11 +46,7 @@ export const fetchVideoLexicon = { schema: { type: "object", required: ["filename"], - properties: { - filename: { - type: "string", - }, - }, + properties: { filename: { type: "string" } }, }, }, errors: [{ name: "Denied" }],