This commit is contained in:
Charlotte Som 2025-06-07 11:34:01 +01:00
parent 1dd74500f2
commit dbf653e7cd
2 changed files with 8 additions and 24 deletions

View file

@ -33,13 +33,13 @@ const fetchVideoRecord = async (
};
const resolveVideoURL = async (
did: `did:${string}`,
repo: `did:${string}`,
blob: string
): Promise<string> => {
const xrpc = new XRPC<VideoLexiconUniverse>(globalThis.location.href);
try {
const xrpc = new XRPC<VideoLexiconUniverse>(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 {

View file

@ -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" }],