fix lint errors

This commit is contained in:
Jim Anderson 2017-06-22 20:45:19 -05:00
parent 3b157dab6b
commit addd10b762

View File

@ -141,8 +141,8 @@ export class SpecManager {
let that = this; let that = this;
function getSecurityDefinition(name:string, scope:string) { function getSecurityDefinition(name:string, scope:string) {
let secDefs = that._schema.securityDefinitions; let secDefs = that._schema.securityDefinitions;
if (secDefs[name] && secDefs[name].type === "oauth2") { if (secDefs[name] && secDefs[name].type === 'oauth2') {
let availScopes = secDefs[name].scopes let availScopes = secDefs[name].scopes;
if (availScopes && availScopes[scope]) { if (availScopes && availScopes[scope]) {
return availScopes[scope]; return availScopes[scope];
} }
@ -162,7 +162,7 @@ export class SpecManager {
Object.keys(scopeObj).forEach(key => { Object.keys(scopeObj).forEach(key => {
let val = scopeObj[key]; let val = scopeObj[key];
let desc = getSecurityDefinition(authName, val); let desc = getSecurityDefinition(authName, val);
// don't add if the security obj doesn't exist in the security definitions // don't add if the security obj doesn't exist in the security definitions
if (desc) { if (desc) {
scopes.push({name: val, description: desc}); scopes.push({name: val, description: desc});