Exemplo n.º 1
0
func (d *ServiceAPI) Delete(params martini.Params, w http.ResponseWriter, r *http.Request) {
	err := service.Delete(d.Zookeeper, d.Config.Bamboo.Zookeeper, params["_1"])
	if err != nil {
		responseError(w, err.Error())
		return
	}

	responseJSON(w, new(map[string]string))
}
Exemplo n.º 2
0
func (d *ServiceAPI) Delete(c web.C, w http.ResponseWriter, r *http.Request) {
	identifier, _ := url.QueryUnescape(c.URLParams["id"])
	err := service.Delete(d.Zookeeper, d.Config.Bamboo.Zookeeper, identifier)
	if err != nil {
		responseError(w, err.Error())
		return
	}

	responseJSON(w, new(map[string]string))
}