Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
Fallback security to root api if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Shimizu committed May 24, 2016
1 parent ade7022 commit 1d5de97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/buildroutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function buildroutes(options) {
name: operation.operationId,
description: operation.description,
method: verb,
security: buildSecurity(options.basedir, api.securityDefinitions, operation.security || def.security),
security: buildSecurity(options.basedir, api.securityDefinitions, operation.security || def.security || api.security),
validators: [],
handler : undefined,
consumes: operation.consumes || api.consumes,
Expand Down Expand Up @@ -151,8 +151,8 @@ function resolve(basedir, pathname, method) {
var handler;
try {
//If the pathname is already a resolved function, return it.
//In the case of x-handler and x-authorize, users can define
//external handler/authorize modules and functions OR override
//In the case of x-handler and x-authorize, users can define
//external handler/authorize modules and functions OR override
//existing x-authorize functions.
if (thing.isFunction(pathname)) {
return pathname;
Expand Down

0 comments on commit 1d5de97

Please sign in to comment.