Checkpoint: v4.0 media service, compose deploy, and verified docs
这个提交包含在:
@@ -258,6 +258,32 @@ ${recentScores.length > 0 ? `- 用户最近的分析数据: ${JSON.stringify(rec
|
||||
return { videoId, url };
|
||||
}),
|
||||
|
||||
registerExternal: protectedProcedure
|
||||
.input(z.object({
|
||||
title: z.string().min(1).max(256),
|
||||
url: z.string().min(1),
|
||||
fileKey: z.string().min(1),
|
||||
format: z.string().min(1).max(16),
|
||||
fileSize: z.number().optional(),
|
||||
duration: z.number().optional(),
|
||||
exerciseType: z.string().optional(),
|
||||
}))
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const videoId = await db.createVideo({
|
||||
userId: ctx.user.id,
|
||||
title: input.title,
|
||||
fileKey: input.fileKey,
|
||||
url: input.url,
|
||||
format: input.format,
|
||||
fileSize: input.fileSize ?? null,
|
||||
duration: input.duration ?? null,
|
||||
exerciseType: input.exerciseType || "recording",
|
||||
analysisStatus: "completed",
|
||||
});
|
||||
|
||||
return { videoId, url: input.url };
|
||||
}),
|
||||
|
||||
list: protectedProcedure.query(async ({ ctx }) => {
|
||||
return db.getUserVideos(ctx.user.id);
|
||||
}),
|
||||
|
||||
在新工单中引用
屏蔽一个用户