mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: idea: unify http responses further (#941)
This commit is contained in:
@@ -63,7 +63,7 @@ type Error struct {
|
||||
}
|
||||
|
||||
// Write outputs a standardized format to an HTTP response body.
|
||||
func Write(rw http.ResponseWriter, status int, response Response) {
|
||||
func Write(rw http.ResponseWriter, status int, response interface{}) {
|
||||
buf := &bytes.Buffer{}
|
||||
enc := json.NewEncoder(buf)
|
||||
enc.SetEscapeHTML(true)
|
||||
|
||||
Reference in New Issue
Block a user