2022-12-22 14:53:14 +00:00
|
|
|
package coderd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2023-08-18 18:55:43 +00:00
|
|
|
"github.com/coder/coder/v2/coderd/httpapi"
|
|
|
|
"github.com/coder/coder/v2/codersdk"
|
2022-12-22 14:53:14 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// @Summary API root handler
|
|
|
|
// @ID api-root-handler
|
|
|
|
// @Produce json
|
|
|
|
// @Tags General
|
|
|
|
// @Success 200 {object} codersdk.Response
|
|
|
|
// @Router / [get]
|
|
|
|
func apiRoot(w http.ResponseWriter, r *http.Request) {
|
|
|
|
httpapi.Write(r.Context(), w, http.StatusOK, codersdk.Response{
|
|
|
|
//nolint:gocritic
|
|
|
|
Message: "👋",
|
|
|
|
})
|
|
|
|
}
|