Command line flag and REST command to reset and resync (fixes #85)

Still needs implemention in GUI
This commit is contained in:
Jakob Borg
2014-04-03 22:10:51 +02:00
parent 15699a39cf
commit d30a286f38
2 changed files with 33 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ func startGUI(addr string, m *Model) {
router.Post("/rest/config", restPostConfig)
router.Post("/rest/restart", restPostRestart)
router.Post("/rest/reset", restPostReset)
router.Post("/rest/error", restPostError)
go func() {
@@ -112,7 +113,12 @@ func restGetConfigInSync(w http.ResponseWriter) {
}
func restPostRestart(req *http.Request) {
restart()
go restart()
}
func restPostReset(req *http.Request) {
resetRepositories()
go restart()
}
type guiFile scanner.File