Example #1
0
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
}
Example #2
0
File: app.go Project: 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
}
Example #3
0
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
}