diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/api.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -66,13 +66,28 @@ func VttRedirect(w http.ResponseWriter, req *http.Request) { } func VttStart(w http.ResponseWriter, req *http.Request) { + if startVtt(req.Context()) != nil { + http.Error(w, "Internal Server Error", http.StatusInternalServerError) + return + } + w.WriteHeader(http.StatusOK) } func VttStop(w http.ResponseWriter, req *http.Request) { + if stopVtt(req.Context()) != nil { + http.Error(w, "Internal Server Error", http.StatusInternalServerError) + return + } + w.WriteHeader(http.StatusOK) } func VttRestart(w http.ResponseWriter, req *http.Request) { + if restartVtt(req.Context()) != nil { + http.Error(w, "Internal Server Error", http.StatusInternalServerError) + return + } + w.WriteHeader(http.StatusOK) } func VttLogs(w http.ResponseWriter, req *http.Request) { |
