Skip to content

Commit

Permalink
feat: add optional marketplace identifiers to split
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Nov 3, 2022
1 parent 2489f1e commit 70b3eee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,14 @@ export const split = async (req, res) => {
newRecord.unitBlockStart = record.unitBlockStart;
newRecord.unitBlockEnd = record.unitBlockEnd;

if (record.marketplaceIdentifier) {
newRecord.marketplaceIdentifier = record.marketplaceIdentifier;
}

if (record.marketplace) {
newRecord.marketplace = record.marketplace;
}

if (record.unitOwner) {
newRecord.unitOwner = record.unitOwner;
}
Expand Down
2 changes: 2 additions & 0 deletions src/validations/units.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ export const unitsSplitSchema = Joi.object({
.custom(pickListValidation('countries', 'countryJurisdictionOfOwner'))
.optional(),
inCountryJurisdictionOfOwner: Joi.string().optional(),
marketplace: Joi.string().disallow('').allow(null).optional(),
marketplaceIdentifier: Joi.string().disallow('').allow(null).optional(),
}),
)
.min(2)
Expand Down

0 comments on commit 70b3eee

Please sign in to comment.