chore: idea: unify http responses further (#941)

This commit is contained in:
Garrett Delfosse
2022-04-12 10:17:33 -05:00
committed by GitHub
parent 4f0f216015
commit d9d4599ba9
16 changed files with 59 additions and 105 deletions
+2 -3
View File
@@ -8,7 +8,6 @@ import (
"net/http"
"time"
"github.com/go-chi/render"
"github.com/hashicorp/yamux"
"golang.org/x/xerrors"
"nhooyr.io/websocket"
@@ -32,8 +31,8 @@ func (api *api) workspaceAgent(rw http.ResponseWriter, r *http.Request) {
})
return
}
render.Status(r, http.StatusOK)
render.JSON(rw, r, apiAgent)
httpapi.Write(rw, http.StatusOK, apiAgent)
}
func (api *api) workspaceAgentDial(rw http.ResponseWriter, r *http.Request) {