diff --git a/src/router/router.go b/src/router/router.go index 368757b..98a1f04 100644 --- a/src/router/router.go +++ b/src/router/router.go @@ -6,6 +6,7 @@ import ( "github.com/gorilla/mux" braillexr "github.com/spatialfree/dofdev/web/pages/braille_xr" "github.com/spatialfree/dofdev/web/pages/mono" + "github.com/spatialfree/dofdev/tem" ) func New() *mux.Router { @@ -15,5 +16,10 @@ func New() *mux.Router { r.HandleFunc("/", mono.Handler) r.HandleFunc("/braille_xr", braillexr.Handler) + r.HandleFunc("/reload", func(w http.ResponseWriter, r *http.Request) { + tem.Load() + // route them back to where they came from + http.Redirect(w, r, r.Header.Get("Referer"), http.StatusFound) + }) return r }