Skip to content

Commit

Permalink
chore(Container): Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
bdfoster committed Nov 21, 2017
1 parent 7c5a505 commit 6898f7f
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,39 +123,10 @@ export class Container extends AsyncEventEmitter {
};
}

// if (!validatorKeywords.validate) {
// validatorKeywords['validate'] = {
// validate: (...args) => {
// return args[0].apply(this, [args.slice(1, args.length)]);
// }
// };
// }

for (const i in validatorKeywords) {
this.validator.addKeyword(i, validatorKeywords[i]);
}

// this.validator.addKeyword('mapper', {
// async: true,
// type: 'string',
// errors: true,
// validate: async (mapper, id, schema, path) => {
// return this.mappers[mapper].get(id).then((record) => {
// return (record.id === id);
// }).catch((error) => {
// if (error.name === 'NotFoundError') {
// throw new ValidationError({
// keyword: 'mapper',
// message: 'should reference an existing record in "' + mapper + '" collection',
// path: path
// });
// }
//
// throw error;
// });
// }
// });

if (options.mappers) {
for (const mapper in options.mappers) {
this.defineMapper(mapper, options.mappers[mapper]);
Expand Down

0 comments on commit 6898f7f

Please sign in to comment.