Added defaultConfig parameter to the options #2

Merged
Istar-Eldritch merged 2 commits from defaultconfig into master 2016-06-05 17:02:40 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 2fd7fa09b0 - Show all commits

View File

@ -100,7 +100,7 @@ export const scope = (server, a, b, names) => {
reply(list); reply(list);
}, },
config: _.defaults({ config: _.defaultsDeep({
validate: { validate: {
params: joi.object().keys({ params: joi.object().keys({
scope: joi.string().valid(...scopes), scope: joi.string().valid(...scopes),
@ -136,7 +136,7 @@ export const scopeScope = (server, a, b, names) => {
reply(list); reply(list);
}, },
config: _.defaults({ config: _.defaultsDeep({
validate: { validate: {
params: joi.object().keys({ params: joi.object().keys({
scopea: joi.string().valid(...scopes.a), scopea: joi.string().valid(...scopes.a),
@ -205,7 +205,7 @@ export const destroyScope = (server, a, b, names) => {
reply(list); reply(list);
}, },
config: _.defaults({ config: _.defaultsDeep({
validate: { validate: {
params: joi.object().keys({ params: joi.object().keys({
scope: joi.string().valid(...scopes), scope: joi.string().valid(...scopes),

View File

@ -56,7 +56,7 @@ export const get = (server, model) => {
reply(instance); reply(instance);
}, },
config: _.defaults({ config: _.defaultsDeep({
validate: { validate: {
params: joi.object().keys({ params: joi.object().keys({
id: joi.number().integer() id: joi.number().integer()
@ -82,7 +82,7 @@ export const scope = (server, model) => {
reply(list); reply(list);
}, },
config: _.defaults({ config: _.defaultsDeep({
validate: { validate: {
params: joi.object().keys({ params: joi.object().keys({
scope: joi.string().valid(...scopes) scope: joi.string().valid(...scopes)
@ -169,7 +169,7 @@ export const destroyScope = (server, model) => {
reply(list); reply(list);
}, },
config: _.defaults({ config: _.defaultsDeep({
validate: { validate: {
params: joi.object().keys({ params: joi.object().keys({
scope: joi.string().valid(...scopes) scope: joi.string().valid(...scopes)