1
0
Fork 0
mirror of synced 2024-11-17 06:25:36 -05:00

Force update user list for kubernetes.secrets backend

Signed-off-by: Vitaliy Snurnitsin <vitaliy.snurnitsin@flant.com>
This commit is contained in:
Vitaliy Snurnitsin 2023-04-27 09:38:01 +03:00
parent a973b88463
commit 9024405232

View file

@ -248,6 +248,15 @@ type clientStatus struct {
func (oAdmin *OvpnAdmin) userListHandler(w http.ResponseWriter, r *http.Request) {
log.Info(r.RemoteAddr, " ", r.RequestURI)
if *storageBackend == "kubernetes.secrets" {
err := app.updateIndexTxtOnDisk()
if err != nil {
log.Errorln(err)
}
oAdmin.clients = oAdmin.usersList()
}
usersList, _ := json.Marshal(oAdmin.clients)
fmt.Fprintf(w, "%s", usersList)
}