fixed admin issue and potential panics

This commit is contained in:
0xdcarns
2022-11-10 14:54:53 -05:00
parent 5ff5e5dca3
commit ea854a6b98
3 changed files with 5 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ func getAllExtClients(w http.ResponseWriter, r *http.Request) {
}
clients := []models.ExtClient{}
var err error
if networksSlice[0] == logic.ALL_NETWORK_ACCESS {
if len(networksSlice) > 0 && networksSlice[0] == logic.ALL_NETWORK_ACCESS {
clients, err = functions.GetAllExtClients()
if err != nil && !database.IsEmptyRecord(err) {
logger.Log(0, "failed to get all extclients: ", err.Error())