diff options
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -92,7 +92,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { log.Info("version: " + version) log.Info("comment: " + comment) - repo := me.repos.View.FindRepoByName(repoName) + repo := me.repos.View.FindByName(repoName) if repo == nil { log.Info("FindRepoByName() returned nil") return @@ -120,11 +120,23 @@ func okHandler(w http.ResponseWriter, r *http.Request) { case "/setTargetVersion": log.Info("repo: " + repoName) log.Info("version: " + version) + if repoName != "" { + repo := me.repos.View.FindByName(repoName) + if repo == nil { + log.Info("could not find repo", repoName) + } else { + log.Info("setting target version", version) + repo.Status.SetTargetVersion(version) + } + return + } + if me.current == nil { log.Info("me.current == nil") return } me.current.Status.SetTargetVersion(version) + return case "/setAllTargetVersions": log.Info("version: " + version) @@ -141,7 +153,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { } } case "/whitelist": - repo := me.repos.View.FindRepoByName(repoName) + repo := me.repos.View.FindByName(repoName) if repo == nil { log.Info("FindRepoByName() returned nil") return |
