aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/thirdparty.go
diff options
context:
space:
mode:
authordevonh <devon.dmytro@gmail.com>2023-05-17 00:33:27 +0000
committerGitHub <noreply@github.com>2023-05-17 00:33:27 +0000
commit67d68768574a234b733eb3e4061644fc098a69f6 (patch)
tree819e9a0a150b68181d91112ffc7e0d6030412b77 /clientapi/routing/thirdparty.go
parent0489d16f95a3d9f1f5bc532e2060bd2482d7b156 (diff)
Move MakeJoin logic to GMSL (#3081)
Diffstat (limited to 'clientapi/routing/thirdparty.go')
-rw-r--r--clientapi/routing/thirdparty.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/clientapi/routing/thirdparty.go b/clientapi/routing/thirdparty.go
index 0ee21855..b805d4b5 100644
--- a/clientapi/routing/thirdparty.go
+++ b/clientapi/routing/thirdparty.go
@@ -33,7 +33,10 @@ func Protocols(req *http.Request, asAPI appserviceAPI.AppServiceInternalAPI, dev
resp := &appserviceAPI.ProtocolResponse{}
if err := asAPI.Protocols(req.Context(), &appserviceAPI.ProtocolRequest{Protocol: protocol}, resp); err != nil {
- return spec.InternalServerError()
+ return util.JSONResponse{
+ Code: http.StatusInternalServerError,
+ JSON: spec.InternalServerError{},
+ }
}
if !resp.Exists {
if protocol != "" {
@@ -71,7 +74,10 @@ func User(req *http.Request, asAPI appserviceAPI.AppServiceInternalAPI, device *
Protocol: protocol,
Params: params.Encode(),
}, resp); err != nil {
- return spec.InternalServerError()
+ return util.JSONResponse{
+ Code: http.StatusInternalServerError,
+ JSON: spec.InternalServerError{},
+ }
}
if !resp.Exists {
return util.JSONResponse{
@@ -97,7 +103,10 @@ func Location(req *http.Request, asAPI appserviceAPI.AppServiceInternalAPI, devi
Protocol: protocol,
Params: params.Encode(),
}, resp); err != nil {
- return spec.InternalServerError()
+ return util.JSONResponse{
+ Code: http.StatusInternalServerError,
+ JSON: spec.InternalServerError{},
+ }
}
if !resp.Exists {
return util.JSONResponse{