CHANGE: added autoLogout to Doc + json in struct

This commit is contained in:
2024-09-25 13:18:54 +02:00
parent 3f5f82a304
commit ea364c8898
4 changed files with 130 additions and 14 deletions

View File

@@ -69,13 +69,13 @@ func logoutHandler(w http.ResponseWriter, r *http.Request) {
setCors(w)
switch r.Method {
case "GET":
autoLogout(w, r)
autoLogout(w)
default:
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
}
}
func autoLogout(w http.ResponseWriter, r *http.Request) {
func autoLogout(w http.ResponseWriter) {
users, err := (*models.User).GetAll(nil)
var logged_out_users []models.User
if err != nil {