diff options
author | Jakob Borg <jakob@nym.se> | 2014-06-16 10:47:02 +0200 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2014-06-16 10:47:02 +0200 |
commit | 26ebbee8775251772b6eacce8de48bf9c7bf5b56 (patch) | |
tree | 245dbd6f8ae6f2a23d40529dc29df2cfe660d862 /cmd | |
parent | 12eda0449a571e501527d6266a8079e6d0a3e20c (diff) |
Hard override on changes from master repo
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/syncthing/gui.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 00c524e43c..5e89ca2549 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -108,6 +108,7 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro router.Post("/rest/error", restPostError) router.Post("/rest/error/clear", restClearErrors) router.Post("/rest/discovery/hint", restPostDiscoveryHint) + router.Post("/rest/model/override", restPostOverride) mr := martini.New() mr.Use(csrfMiddleware) @@ -172,6 +173,12 @@ func restGetModel(m *model.Model, w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(res) } +func restPostOverride(m *model.Model, r *http.Request) { + var qs = r.URL.Query() + var repo = qs.Get("repo") + m.Override(repo) +} + func restGetNeed(m *model.Model, w http.ResponseWriter, r *http.Request) { var qs = r.URL.Query() var repo = qs.Get("repo") |