mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Removed function processRelevancySet
This commit is contained in:
@@ -368,7 +368,7 @@ export class Pass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const valid = processRelevancySet(Schemas.Beacon, data);
|
const valid = getValidInArray(Schemas.Beacon, data);
|
||||||
|
|
||||||
if (valid.length) {
|
if (valid.length) {
|
||||||
this[passProps]["beacons"] = valid;
|
this[passProps]["beacons"] = valid;
|
||||||
@@ -391,7 +391,7 @@ export class Pass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const valid = processRelevancySet(Schemas.Location, data);
|
const valid = getValidInArray(Schemas.Location, data);
|
||||||
|
|
||||||
if (valid.length) {
|
if (valid.length) {
|
||||||
this[passProps]["locations"] = valid;
|
this[passProps]["locations"] = valid;
|
||||||
@@ -747,10 +747,6 @@ function barcodesFromUncompleteData(message: string): Schemas.Barcode[] {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function processRelevancySet<T>(schema: Joi.ObjectSchema<T>, data: T[]): T[] {
|
|
||||||
return getValidInArray(schema, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getValidInArray<T>(
|
function getValidInArray<T>(
|
||||||
schemaName: Joi.ObjectSchema<T>,
|
schemaName: Joi.ObjectSchema<T>,
|
||||||
contents: T[],
|
contents: T[],
|
||||||
|
|||||||
Reference in New Issue
Block a user