REST API: fix token invalidation after password change

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-06-07 18:19:05 +02:00
parent aceecd9800
commit 1f8ac8bfe1
7 changed files with 56 additions and 18 deletions

View File

@@ -297,6 +297,7 @@ func changeAdminPassword(w http.ResponseWriter, r *http.Request) {
sendAPIResponse(w, r, err, "", getRespStatus(err))
return
}
invalidateToken(r)
sendAPIResponse(w, r, err, "Password updated", http.StatusOK)
}