mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
ref: move httpapi.Reponse into codersdk (#2954)
This commit is contained in:
@ -134,7 +134,7 @@ func New(options *Options) *API {
|
||||
|
||||
r.Route("/api/v2", func(r chi.Router) {
|
||||
r.NotFound(func(rw http.ResponseWriter, r *http.Request) {
|
||||
httpapi.Write(rw, http.StatusNotFound, httpapi.Response{
|
||||
httpapi.Write(rw, http.StatusNotFound, codersdk.Response{
|
||||
Message: "Route not found.",
|
||||
})
|
||||
})
|
||||
@ -144,7 +144,7 @@ func New(options *Options) *API {
|
||||
debugLogRequest(api.Logger),
|
||||
)
|
||||
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
httpapi.Write(w, http.StatusOK, httpapi.Response{
|
||||
httpapi.Write(w, http.StatusOK, codersdk.Response{
|
||||
//nolint:gocritic
|
||||
Message: "👋",
|
||||
})
|
||||
|
Reference in New Issue
Block a user