diff --git a/pkg/api/api.go b/pkg/api/api.go index b81e80e..abe1c62 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -81,6 +81,7 @@ func NewAPI(config Config) (*API, error) { // user apiMux.HandleFunc("/login", api.HandleLogin) apiMux.HandleFunc("/register", api.HandleRegister) + apiMux.HandleFunc("/logout", api.LoginAsAnonymous) // below needs token apiMux.HandleFunc("/walk", api.HandleWalk) apiMux.HandleFunc("/reset", api.HandleReset) diff --git a/web/src/component/Manage.js b/web/src/component/Manage.js index 3ac0410..f2304ae 100644 --- a/web/src/component/Manage.js +++ b/web/src/component/Manage.js @@ -39,7 +39,21 @@ function Manage(props) { )} {props.user.role !== 0 && ( - + )}