You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
558 B
24 lines
558 B
package dash
|
|
|
|
import (
|
|
"io"
|
|
"net/http"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/admin/internal/httputil"
|
|
)
|
|
|
|
func writeJSON(w http.ResponseWriter, status int, payload interface{}) {
|
|
httputil.WriteJSON(w, status, payload)
|
|
}
|
|
|
|
func writeJSONError(w http.ResponseWriter, status int, message string) {
|
|
httputil.WriteJSONError(w, status, message)
|
|
}
|
|
|
|
func decodeJSONBody(r io.Reader, v interface{}) error {
|
|
return httputil.DecodeJSONBody(r, v)
|
|
}
|
|
|
|
func newJSONMaxReader(w http.ResponseWriter, r *http.Request) io.Reader {
|
|
return httputil.NewJSONMaxReader(w, r)
|
|
}
|