feat: implement inventory and pantry management views with CRUD functionality and user-friendly interfaces

This commit is contained in:
Nils-Johan Gynther
2026-04-21 14:43:18 +02:00
parent 82c3dc3fee
commit 81b63b3fdb
14 changed files with 352 additions and 59 deletions
@@ -239,4 +239,12 @@ export class InventoryService {
},
});
}
async remove(id: number) {
const existing = await this.prisma.inventoryItem.findUnique({ where: { id } });
if (!existing) {
throw new NotFoundException(`Inventory item with id ${id} not found`);
}
return this.prisma.inventoryItem.delete({ where: { id } });
}
}