rename helper path

This commit is contained in:
2016-04-14 15:33:17 -07:00
parent a25833f60e
commit 992810d90c
2 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
import Joi from 'joi';
var schema = Joi.object({
url: Joi.string().uri({ scheme: ['http', 'https'] }).default('http://localhost:9200'),
index: Joi.string().required(),
interval: Joi.string().default('1w'),
timeout: Joi.number().min(10000).default(10000),
}).default();
const validateSchema = (options) => new Promise(function (resolve, reject) {
schema.validate(options, (err, settings) => {
if (err) return reject(err);
resolve(settings);
})
})
export default validateSchema;