refactor: rename pong to ping

This commit is contained in:
Derrick Hammer 2024-03-13 17:34:10 -04:00
parent 2e3ec1408e
commit 4f891e067c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ func (a AccountAPI) passwordResetConfirm(jc jape.Context) {
jc.ResponseWriter.WriteHeader(http.StatusOK) jc.ResponseWriter.WriteHeader(http.StatusOK)
} }
func (a AccountAPI) pong(jc jape.Context) { func (a AccountAPI) ping(jc jape.Context) {
jc.Encode(&PongResponse{ jc.Encode(&PongResponse{
Ping: "pong", Ping: "pong",
}) })
@ -287,7 +287,7 @@ func (a AccountAPI) Routes() (*httprouter.Router, error) {
}) })
routes := map[string]jape.Handler{ routes := map[string]jape.Handler{
"POST /api/auth/ping": middleware.ApplyMiddlewares(a.pong, authMw2fa, middleware.ProxyMiddleware), "POST /api/auth/ping": middleware.ApplyMiddlewares(a.ping, authMw2fa, middleware.ProxyMiddleware),
"POST /api/auth/login": middleware.ApplyMiddlewares(a.login, authMw2fa, middleware.ProxyMiddleware), "POST /api/auth/login": middleware.ApplyMiddlewares(a.login, authMw2fa, middleware.ProxyMiddleware),
"POST /api/auth/register": middleware.ApplyMiddlewares(a.register, middleware.ProxyMiddleware), "POST /api/auth/register": middleware.ApplyMiddlewares(a.register, middleware.ProxyMiddleware),
"POST /api/auth/verify-email": middleware.ApplyMiddlewares(a.verifyEmail, middleware.ProxyMiddleware), "POST /api/auth/verify-email": middleware.ApplyMiddlewares(a.verifyEmail, middleware.ProxyMiddleware),