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:
co-authored by
Claude Sonnet 4.6
parent
1fc2702a4b
commit
233a117f5b
@@ -10,7 +10,7 @@ async function fetchDiffs(artboardId: string): Promise<IntentDiff[]> {
|
||||
}
|
||||
|
||||
async function createDiffRequest(
|
||||
body: Omit<InsertIntentDiff, 'author_id'>,
|
||||
body: Omit<InsertIntentDiff, 'author_email'>,
|
||||
): Promise<IntentDiff> {
|
||||
const res = await fetch('/api/diffs', {
|
||||
method: 'POST',
|
||||
@@ -55,7 +55,7 @@ export function useDiffs(artboardId: string | null) {
|
||||
});
|
||||
|
||||
const createDiff = useMutation({
|
||||
mutationFn: (body: Omit<InsertIntentDiff, 'author_id'>) => createDiffRequest(body),
|
||||
mutationFn: (body: Omit<InsertIntentDiff, 'author_email'>) => createDiffRequest(body),
|
||||
onSuccess: () => queryClient.invalidateQueries({ queryKey }),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user