aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2021-11-23 10:04:06 -0800
committerMike Crute <mike@crute.us>2021-11-23 10:04:06 -0800
commit67a9fcd6670df5efe4a914de85ec0846b3b80cf5 (patch)
treea371bdabeb4f4bf66176d064fe2ffcf57d5c105b /app
parent853cab121191a2cf4dd37c68149fc23b64235464 (diff)
downloadcloud-identity-broker-67a9fcd6670df5efe4a914de85ec0846b3b80cf5.tar.bz2
cloud-identity-broker-67a9fcd6670df5efe4a914de85ec0846b3b80cf5.tar.xz
cloud-identity-broker-67a9fcd6670df5efe4a914de85ec0846b3b80cf5.zip
Split POST endpoints
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api_account.go4
-rw-r--r--app/controllers/api_user.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/api_account.go b/app/controllers/api_account.go
index 8ef18ce..f22191d 100644
--- a/app/controllers/api_account.go
+++ b/app/controllers/api_account.go
@@ -20,7 +20,7 @@ type APIAccountHandler struct {
20 AdminStore models.AccountStore 20 AdminStore models.AccountStore
21} 21}
22 22
23func (h *APIAccountHandler) Register(prefix string, r glecho.URLRouter, mw ...echo.MiddlewareFunc) { 23func (h *APIAccountHandler) Register(prefix, postPrefix string, r glecho.URLRouter, mw ...echo.MiddlewareFunc) {
24 // This resource did not exist in the V1 API and thus has no V1 24 // This resource did not exist in the V1 API and thus has no V1
25 // representation. We use the default handlers for V1 because otherwise 25 // representation. We use the default handlers for V1 because otherwise
26 // requests with V1 Accept headers would result in 406 Unacceptable errors. 26 // requests with V1 Accept headers would result in 406 Unacceptable errors.
@@ -49,7 +49,7 @@ func (h *APIAccountHandler) Register(prefix string, r glecho.URLRouter, mw ...ec
49 contentTypeV2: h.HandlePost, 49 contentTypeV2: h.HandlePost,
50 }, 50 },
51 } 51 }
52 r.POST(prefix, poh.Handle, mw...) 52 r.POST(postPrefix, poh.Handle, mw...)
53 53
54 r.DELETE(prefix, h.HandleDelete, mw...) 54 r.DELETE(prefix, h.HandleDelete, mw...)
55} 55}
diff --git a/app/controllers/api_user.go b/app/controllers/api_user.go
index df667db..f265f26 100644
--- a/app/controllers/api_user.go
+++ b/app/controllers/api_user.go
@@ -15,7 +15,7 @@ type APIUserHandler struct {
15 Store models.UserStore 15 Store models.UserStore
16} 16}
17 17
18func (h *APIUserHandler) Register(prefix string, r glecho.URLRouter, mw ...echo.MiddlewareFunc) { 18func (h *APIUserHandler) Register(prefix, postPrefix string, r glecho.URLRouter, mw ...echo.MiddlewareFunc) {
19 // This resource did not exist in the V1 API and thus has no V1 19 // This resource did not exist in the V1 API and thus has no V1
20 // representation. We use the default handlers for V1 because otherwise 20 // representation. We use the default handlers for V1 because otherwise
21 // requests with V1 Accept headers would result in 406 Unacceptable errors. 21 // requests with V1 Accept headers would result in 406 Unacceptable errors.
@@ -44,7 +44,7 @@ func (h *APIUserHandler) Register(prefix string, r glecho.URLRouter, mw ...echo.
44 contentTypeV2: h.HandlePost, 44 contentTypeV2: h.HandlePost,
45 }, 45 },
46 } 46 }
47 r.POST(prefix, poh.Handle, mw...) 47 r.POST(postPrefix, poh.Handle, mw...)
48 48
49 r.DELETE(prefix, h.HandleDelete, mw...) 49 r.DELETE(prefix, h.HandleDelete, mw...)
50} 50}