0.6 rust重构01

This commit is contained in:
lix-2026
2026-04-14 13:22:29 +08:00
parent 71fb1aee7e
commit 84a8454fa9
401 changed files with 5841 additions and 1512 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { mutation, query } from "./_generated/server";
import { v } from "convex/values";
import { nowIso } from "./_utils/time";
import type { MutationCtx, QueryCtx } from "./_generated/server";
import { getCanonicalDocumentByBusinessId } from "./_utils/documentRecord";
async function assertWorkspaceMember(ctx: QueryCtx | MutationCtx, userId: string, workspaceId: string) {
const membership = await ctx.db
@@ -120,7 +121,7 @@ export const listBacklinks = query({
const sourceTitleById = new Map<string, string | null>();
for (const sid of sourceIds) {
const doc = await ctx.db.query("documents").withIndex("by_document_id", (q) => q.eq("id", sid)).first();
const doc = await getCanonicalDocumentByBusinessId<any>(ctx, sid);
sourceTitleById.set(sid, doc ? (doc.title ?? null) : null);
}