diff --git a/project/project.go b/project/project.go index fd89965..265f27f 100644 --- a/project/project.go +++ b/project/project.go @@ -172,12 +172,19 @@ func Track(dbConn *sql.DB, mu *sync.Mutex, manualRefresh *chan struct{}, name, u } func Untrack(dbConn *sql.DB, mu *sync.Mutex, id string) { - err := db.DeleteProject(dbConn, mu, id) + proj, err := db.GetProject(dbConn, id) + if err != nil { + fmt.Println("Error getting project:", err) + } + + err = db.DeleteProject(dbConn, mu, proj["id"]) if err != nil { fmt.Println("Error deleting project:", err) } - err = git.RemoveRepo(id) + // TODO: before removing, check whether other tracked projects use the same + // repo + err = git.RemoveRepo(proj["url"]) if err != nil { log.Println(err) } diff --git a/ws/static/home.html b/ws/static/home.html index 0a91a6d..13baf99 100644 --- a/ws/static/home.html +++ b/ws/static/home.html @@ -34,7 +34,7 @@ {{- range . -}} {{- if ne .Running (index .Releases 0).Tag -}}
You've selected {{ .Running }}. Modify?
Latest: {{ (index .Releases 0).Tag }}
@@ -52,7 +52,7 @@ {{- range . -}} {{- if eq .Running (index .Releases 0).Tag -}} {{- end -}}