package api

import (
	"net/http"

	"github.com/gin-gonic/gin"
	"github.com/pingcap/dbaas/admin/errs"
)

func Ping(c *gin.Context) {
	shouldFail := c.Query("shouldFail")
	if shouldFail != "" {
		Fail(c, errs.ErrInvalidToken, http.StatusBadRequest)
		return
	}

	Success(c, "pong", http.StatusOK)
}
