Feature: add dns query json api
This commit is contained in:
@ -70,12 +70,10 @@ func getProxy(w http.ResponseWriter, r *http.Request) {
|
||||
render.JSON(w, r, proxy)
|
||||
}
|
||||
|
||||
type UpdateProxyRequest struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func updateProxy(w http.ResponseWriter, r *http.Request) {
|
||||
req := UpdateProxyRequest{}
|
||||
req := struct {
|
||||
Name string `json:"name"`
|
||||
}{}
|
||||
if err := render.DecodeJSON(r.Body, &req); err != nil {
|
||||
render.Status(r, http.StatusBadRequest)
|
||||
render.JSON(w, r, ErrBadRequest)
|
||||
|
Reference in New Issue
Block a user