Files

17 lines
389 B
Go

package cli
import (
"os/exec"
"errors"
"fmt"
"net/http"
)
func (h *abraHandler) handleRemoveApp(w http.ResponseWriter, r *http.Request, appName string) {
cmd := exec.Command("abra", "app", "remove", appName, "-n")
output, err := cmd.Output()
if err != nil {
InternalServerError(w, errors.New(fmt.Sprintf("Error: %s", string(output))))
return
}
w.WriteHeader(http.StatusOK)
}