Add environments reading (#13701)

### What problem does this PR solve?

environment variable > config file

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-03-19 18:50:28 +08:00
committed by GitHub
parent 757d8d42dd
commit 8d50ee632d
6 changed files with 239 additions and 119 deletions

View File

@ -473,7 +473,14 @@ func (h *Handler) ListRoles(c *gin.Context) {
return
}
success(c, roles, "")
if roles == nil {
roles = []map[string]interface{}{}
}
success(c, gin.H{
"roles": roles,
"total": len(roles),
}, "")
}
// CreateRoleHTTPRequest create role request