File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ bedrock.events.on('bedrock-express.configure.routes', app => {
4747 // create middleware for handling KMS operations
4848 const handleOperation = middleware . createKmsOperationMiddleware ( ) ;
4949
50+ // create middleware for returning all keystores from root controller
51+ const getAllKeystoreConfigs = middleware . createGetAllKeystoreConfigs ( ) ;
52+
5053 // create middleware for getting consistent view of the keystore config
5154 // associated with a request
5255 const getKeystoreConfig = middleware . createGetKeystoreConfig ( { routes} ) ;
@@ -71,12 +74,9 @@ bedrock.events.on('bedrock-express.configure.routes', app => {
7174 return req . query . controller ;
7275 }
7376 } ) ,
77+ getAllKeystoreConfigs ,
7478 asyncHandler ( async ( req , res ) => {
75- const controller = req . query . controller ;
76- const results = await keystores . find ( { controller} ) ;
77- res . json ( {
78- results : results . map ( r => r . config )
79- } ) ;
79+ res . json ( { results : req . keystores } ) ;
8080 } ) ) ;
8181
8282 // create a new keystore
You can’t perform that action at this time.
0 commit comments