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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user