Skip to content

Commit 90b6dae

Browse files
committed
#1526 - unitName is optional
1 parent ea2880a commit 90b6dae

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/backend/src/routes/projects.routes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ projectRouter.post(
7474
nonEmptyString(body('manufacturerPartNumber')),
7575
nonEmptyString(body('pdmFileName').optional()),
7676
intMinZero(body('quantity')),
77-
nonEmptyString(body('unitName')),
77+
nonEmptyString(body('unitName')).optional(),
7878
intMinZero(body('price')), // in cents
7979
intMinZero(body('subtotal')), // in cents
8080
nonEmptyString(body('linkUrl').isURL()),
@@ -87,11 +87,12 @@ projectRouter.post(
8787
nonEmptyString(body('name')),
8888
nonEmptyString(body('assemblyId').optional()),
8989
isMaterialStatus(body('status')),
90+
nonEmptyString(body('materialTypeName')),
9091
nonEmptyString(body('manufacturerName')),
9192
nonEmptyString(body('manufacturerPartNumber')),
9293
nonEmptyString(body('pdmFileName').optional()),
9394
intMinZero(body('quantity')),
94-
nonEmptyString(body('unitName').optional()),
95+
body('unitName').optional(),
9596
intMinZero(body('price')), // in cents
9697
intMinZero(body('subtotal')), // in cents
9798
nonEmptyString(body('linkUrl').isURL()),

0 commit comments

Comments
 (0)