fix: resolve TypeScript build errors from leftJoin nullable types
Non-null assert photo/achievement ids that are structurally non-null due to FK constraints but nullable in Drizzle's leftJoin return type. Add missing description field to enrichVideo model select and map. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -195,8 +195,8 @@ builder.queryField("adminGetUser", (t) =>
|
||||
.orderBy(user_photos.sort);
|
||||
const seen = new Set<string>();
|
||||
const photos = photoRows
|
||||
.filter((p) => p.id && !seen.has(p.id) && seen.add(p.id))
|
||||
.map((p) => ({ id: p.id, filename: p.filename }));
|
||||
.filter((p) => p.id !== null && !seen.has(p.id!) && seen.add(p.id!))
|
||||
.map((p) => ({ id: p.id!, filename: p.filename! }));
|
||||
return { ...user[0], photos };
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user