Closed jeffdare closed 8 years ago
The function appEnv.getServiceCreds(spec)
operates against the name, not label. Per the doc, the argument acts the same as appEnv.getServiceURL(spec)
, so if you specify a regex, it (presumably) returns the first match. If you pass a name, will return the service matching the name. At least when I last used CF, service names were unique within an org (or perhaps a smaller scope), but service labels could be the same for different services. So, if you have two instances of the same service, that your app is using, they have to have different names, but may well have the same labels (prolly do).
Closing, but feel free to reopen if I misread this ...
https://www.npmjs.com/package/cfenv#appenvgetservicecredsspec
getServiceCreds function currently returns the first matched creds of the service. But what if the same service has 2 instances, shouldn't this function return 2(in array of creds).