0.6 rust重构01
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user