Show current repository state (fixes #89)

This commit is contained in:
Jakob Borg
2014-04-14 09:58:17 +02:00
parent 5064f846fc
commit 48bfc2d9ed
6 changed files with 87 additions and 7 deletions

View File

@@ -88,6 +88,8 @@ func restGetModel(m *Model, w http.ResponseWriter, params martini.Params) {
res["inSyncFiles"], res["inSyncBytes"] = globalFiles-needFiles, globalBytes-needBytes
res["state"] = m.State(repo)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(res)
}