Skip to content

Commit

Permalink
Use new field names for uom
Browse files Browse the repository at this point in the history
  • Loading branch information
Loskir committed May 30, 2023
1 parent effc77a commit 82d6bd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion functions/products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ export function formatUom(product: ProductWithPriceModel) {
case UomType.l:
return "л"
default:
return product.uom || "шт"
return product.uomName || "шт"
}
}
6 changes: 3 additions & 3 deletions models/Product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { z } from "zod"
export enum UomType {
kg = "kg",
l = "l",
none = "none",
pcs = "pcs",
}

export const PriceHistoryPriceModel = z.object({
Expand All @@ -23,8 +23,8 @@ export interface ProductModel {
ean?: string
eans?: string[]
uomType?: UomType
uom?: string
volume?: number
uomName?: string
uomValue?: number
}

export interface ProductPriceModel extends PriceHistoryPriceModel {
Expand Down

1 comment on commit 82d6bd8

@vercel
Copy link

@vercel vercel bot commented on 82d6bd8 May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

price-monitor – ./

price-monitor-loskir.vercel.app
price-monitor-mu.vercel.app
price-monitor-git-main-loskir.vercel.app

Please sign in to comment.