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