fix: update useDiffs Omit key from author_id to author_email

InsertIntentDiff.author_id was renamed to author_email in the email
identity migration. useDiffs.ts still referenced the old field name in
its Omit<> types, causing the Next.js build to fail on Vercel and Render.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
SinachPat
2026-05-06 22:17:04 +01:00
co-authored by Claude Sonnet 4.6
parent 1fc2702a4b
commit 233a117f5b
+2 -2
View File
@@ -10,7 +10,7 @@ async function fetchDiffs(artboardId: string): Promise<IntentDiff[]> {
} }
async function createDiffRequest( async function createDiffRequest(
body: Omit<InsertIntentDiff, 'author_id'>, body: Omit<InsertIntentDiff, 'author_email'>,
): Promise<IntentDiff> { ): Promise<IntentDiff> {
const res = await fetch('/api/diffs', { const res = await fetch('/api/diffs', {
method: 'POST', method: 'POST',
@@ -55,7 +55,7 @@ export function useDiffs(artboardId: string | null) {
}); });
const createDiff = useMutation({ const createDiff = useMutation({
mutationFn: (body: Omit<InsertIntentDiff, 'author_id'>) => createDiffRequest(body), mutationFn: (body: Omit<InsertIntentDiff, 'author_email'>) => createDiffRequest(body),
onSuccess: () => queryClient.invalidateQueries({ queryKey }), onSuccess: () => queryClient.invalidateQueries({ queryKey }),
}); });