feat: add imageSourceUrl to Zod schemas and service functions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 13:14:13 +02:00
parent 1eb4a786ce
commit d104e9788f
3 changed files with 11 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ export function getAllItems(db: Db = prodDb) {
notes: items.notes,
productUrl: items.productUrl,
imageFilename: items.imageFilename,
imageSourceUrl: items.imageSourceUrl,
createdAt: items.createdAt,
updatedAt: items.updatedAt,
categoryName: categories.name,
@@ -38,6 +39,7 @@ export function getItemById(db: Db = prodDb, id: number) {
notes: items.notes,
productUrl: items.productUrl,
imageFilename: items.imageFilename,
imageSourceUrl: items.imageSourceUrl,
createdAt: items.createdAt,
updatedAt: items.updatedAt,
})
@@ -65,6 +67,7 @@ export function createItem(
notes: data.notes ?? null,
productUrl: data.productUrl ?? null,
imageFilename: data.imageFilename ?? null,
imageSourceUrl: data.imageSourceUrl ?? null,
})
.returning()
.get();
@@ -81,6 +84,7 @@ export function updateItem(
notes: string;
productUrl: string;
imageFilename: string;
imageSourceUrl: string;
}>,
) {
// Check if item exists first