mirror of https://github.com/Seich/Beau.git
WIp
This commit is contained in:
parent
d7ae1cd0e3
commit
d9d95ff039
|
|
@ -17,7 +17,7 @@ class RequestCache {
|
|||
let result = this.$cache;
|
||||
path.split('.').forEach(part => {
|
||||
if (result[part] === undefined) {
|
||||
throw new Error(`${path} not found in cache: `, path);
|
||||
throw new Error(`${path} not found in cache.`);
|
||||
}
|
||||
|
||||
result = result[part];
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ const requestSchema = [
|
|||
PAYLOAD: [Joi.object().keys(null), Joi.string()],
|
||||
PARAMS: Joi.object().keys(null),
|
||||
FORM: Joi.object().keys(null),
|
||||
ALIAS: Joi.string().required()
|
||||
ALIAS: Joi.string().required(),
|
||||
FORMDATA: Joi.object().keys(null)
|
||||
})
|
||||
.or('FORM', 'PAYLOAD', 'FORMDATA')
|
||||
.rename(/headers/i, 'HEADERS', { override: true })
|
||||
.rename(/payload/i, 'PAYLOAD', { override: true })
|
||||
.rename(/params/i, 'PARAMS', { override: true })
|
||||
|
|
|
|||
Loading…
Reference in New Issue