mirror of
https://github.com/dnote/dnote
synced 2026-03-14 22:45:50 +01:00
Preserve backwards compatibility of health endpoint (#593)
This commit is contained in:
parent
01a378c5b1
commit
a4b7a07bff
2 changed files with 3 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ func TestHealth(t *testing.T) {
|
|||
defer server.Close()
|
||||
|
||||
// Execute
|
||||
req := testutils.MakeReq(server.URL, "GET", "/api/health", "")
|
||||
req := testutils.MakeReq(server.URL, "GET", "/health", "")
|
||||
res := testutils.HTTPDo(t, req)
|
||||
|
||||
// Test
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ func NewWebRoutes(a *app.App, c *Controllers) []Route {
|
|||
{"GET", "/verify-email/{token}", mw.Auth(a, c.Users.VerifyEmail, redirectGuest), true},
|
||||
{"PATCH", "/account/profile", mw.Auth(a, c.Users.ProfileUpdate, nil), true},
|
||||
{"PATCH", "/account/password", mw.Auth(a, c.Users.PasswordUpdate, nil), true},
|
||||
|
||||
{"GET", "/health", c.Health.Index, true},
|
||||
}
|
||||
|
||||
if !a.Config.DisableRegistration {
|
||||
|
|
@ -59,9 +61,6 @@ func NewAPIRoutes(a *app.App, c *Controllers) []Route {
|
|||
proOnly := mw.AuthParams{ProOnly: true}
|
||||
|
||||
return []Route{
|
||||
// internal
|
||||
{"GET", "/health", c.Health.Index, true},
|
||||
|
||||
// v3
|
||||
{"GET", "/v3/sync/fragment", mw.Cors(mw.Auth(a, c.Sync.GetSyncFragment, &proOnly)), false},
|
||||
{"GET", "/v3/sync/state", mw.Cors(mw.Auth(a, c.Sync.GetSyncState, &proOnly)), false},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue