feat: implement QOL features (Stats, Search, Dram of the Day)

This commit is contained in:
2025-12-18 12:34:51 +01:00
parent 7d395392d1
commit 35c2443473
6 changed files with 235 additions and 11 deletions

View File

@@ -13,7 +13,11 @@ export async function updateBottleStatus(bottleId: string, status: 'sealed' | 'o
const { error } = await supabase
.from('bottles')
.update({ status, updated_at: new Date().toISOString() })
.update({
status,
updated_at: new Date().toISOString(),
finished_at: status === 'empty' ? new Date().toISOString() : null
})
.eq('id', bottleId)
.eq('user_id', session.user.id);