feat: enhance bottle metadata with distillation/bottling dates and batch info

This commit is contained in:
2025-12-18 13:24:41 +01:00
parent 61a7966579
commit acf02a78dd
7 changed files with 81 additions and 8 deletions

View File

@@ -12,6 +12,9 @@ export async function updateBottle(bottleId: string, data: {
age?: number;
whiskybase_id?: string;
purchase_price?: number;
distilled_at?: string;
bottled_at?: string;
batch_info?: string;
}) {
const supabase = createServerActionClient({ cookies });
@@ -29,6 +32,9 @@ export async function updateBottle(bottleId: string, data: {
age: data.age,
whiskybase_id: data.whiskybase_id,
purchase_price: data.purchase_price,
distilled_at: data.distilled_at,
bottled_at: data.bottled_at,
batch_info: data.batch_info,
updated_at: new Date().toISOString(),
})
.eq('id', bottleId)