Add: Handle logout

This commit is contained in:
2021-12-12 01:26:46 +08:00
parent e608a6b1df
commit 1f960f8f64
3 changed files with 17 additions and 3 deletions

View File

@@ -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)