memoize definitionsToAuthorize based on securityDefinitons value

This commit is contained in:
Kyle Shockey
2017-10-27 22:41:27 -07:00
parent ac36d46467
commit 109f7ed430

View File

@@ -20,10 +20,10 @@ function onlyOAS3(selector) {
export const definitionsToAuthorize = onlyOAS3(createSelector( export const definitionsToAuthorize = onlyOAS3(createSelector(
state, state,
({ specSelectors }) => { ({specSelectors}) => specSelectors.securityDefinitions(),
(system, definitions) => {
// Coerce our OpenAPI 3.0 definitions into monoflow definitions // Coerce our OpenAPI 3.0 definitions into monoflow definitions
// that look like Swagger2 definitions. // that look like Swagger2 definitions.
let definitions = specSelectors.securityDefinitions()
let list = List() let list = List()
definitions.entrySeq().forEach( ([ defName, definition ]) => { definitions.entrySeq().forEach( ([ defName, definition ]) => {