update-user-list-in-ha-mode
update-user-list-in-ha-mode
This commit is contained in:
parent
85bca48892
commit
84741d46ad
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue