mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
webadmin: add defender page
This commit is contained in:
@@ -14,7 +14,12 @@ import (
|
||||
)
|
||||
|
||||
func getDefenderHosts(w http.ResponseWriter, r *http.Request) {
|
||||
render.JSON(w, r, common.GetDefenderHosts())
|
||||
hosts := common.GetDefenderHosts()
|
||||
if hosts == nil {
|
||||
render.JSON(w, r, make([]common.DefenderEntry, 0))
|
||||
return
|
||||
}
|
||||
render.JSON(w, r, hosts)
|
||||
}
|
||||
|
||||
func getDefenderHostByID(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user