1
0
Fork 0
mirror of synced 2024-11-04 16:58:57 -05:00

update-user-list-in-ha-mode

update-user-list-in-ha-mode
This commit is contained in:
Ilya Sosnovsky 2023-06-16 10:59:54 +03:00 committed by GitHub
parent 85bca48892
commit 84741d46ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,15 @@ import (
func (oAdmin *OvpnAdmin) UserListHandler(w http.ResponseWriter, r *http.Request) {
log.Info(r.RemoteAddr, " ", r.RequestURI)
if *StorageBackend == "kubernetes.secrets" {
err := oAdmin.KubeClient.updateIndexTxtOnDisk()
if err != nil {
log.Errorln(err)
}
oAdmin.clients = oAdmin.usersList()
}
usersList, _ := json.Marshal(oAdmin.clients)
fmt.Fprintf(w, "%s", usersList)
}