示例#1
0
文件: app.go 项目: bardusco/tsuru
func appDelete(w http.ResponseWriter, r *http.Request, u *auth.User) error {
	a, err := getApp(r.URL.Query().Get(":name"), u)
	if err != nil {
		return err
	}
	app.ForceDestroy(&a)
	fmt.Fprint(w, "success")
	return nil
}
示例#2
0
文件: app.go 项目: nihao/tsuru
func forceDeleteApp(w http.ResponseWriter, r *http.Request, t *auth.Token) error {
	u, err := t.User()
	if err != nil {
		return err
	}
	a, err := getApp(r.URL.Query().Get(":app"), u)
	if err != nil {
		return err
	}
	app.ForceDestroy(&a)
	fmt.Fprint(w, "success")
	return nil
}
示例#3
0
文件: app.go 项目: rif/golang-stuff
func appDelete(w http.ResponseWriter, r *http.Request, t *auth.Token) error {
	u, err := t.User()
	if err != nil {
		return err
	}
	rec.Log(u.Email, "app-delete", r.URL.Query().Get(":app"))
	a, err := getApp(r.URL.Query().Get(":app"), u)
	if err != nil {
		return err
	}
	app.ForceDestroy(&a)
	fmt.Fprint(w, "success")
	return nil
}