You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by sm...@apache.org on 2019/09/04 17:01:59 UTC
[incubator-milagro-dta] 02/02: all nodeTypes can see status page
This is an automated email from the ASF dual-hosted git repository.
smihaylov pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git
commit 0e0d097bf879f33ed644b48e7eb666173db30b77
Author: howardkitto <ki...@gmail.com>
AuthorDate: Wed Sep 4 17:47:27 2019 +0100
all nodeTypes can see status page
---
pkg/endpoints/endpoints.go | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/pkg/endpoints/endpoints.go b/pkg/endpoints/endpoints.go
index 40d82d9..f7f11a7 100644
--- a/pkg/endpoints/endpoints.go
+++ b/pkg/endpoints/endpoints.go
@@ -176,7 +176,10 @@ func Endpoints(svc service.Service, corsAllow string, authorizer transport.Autho
ErrStatus: transport.ErrorStatus{
transport.ErrInvalidRequest: http.StatusUnprocessableEntity,
},
- },
+ },
+ }
+
+ statusEndPoints := transport.HTTPEndpoints{
"Status": {
Path: "/" + apiVersion + "/status",
Method: http.MethodGet,
@@ -194,11 +197,11 @@ func Endpoints(svc service.Service, corsAllow string, authorizer transport.Autho
switch strings.ToLower(nodeType) {
case "multi":
- return concatEndpoints(masterFiduciaryEndpoints, identityEndpoints, principalEndpoints)
+ return concatEndpoints(masterFiduciaryEndpoints, identityEndpoints, principalEndpoints, statusEndPoints)
case "principal":
- return concatEndpoints(identityEndpoints, principalEndpoints)
+ return concatEndpoints(identityEndpoints, principalEndpoints, statusEndPoints)
case "fiduciary", "masterfiduciary":
- return concatEndpoints(masterFiduciaryEndpoints, identityEndpoints)
+ return concatEndpoints(masterFiduciaryEndpoints, identityEndpoints, statusEndPoints)
}
return nil