diff options
Diffstat (limited to 'api4/params.go')
-rw-r--r-- | api4/params.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/api4/params.go b/api4/params.go index e8e3f25e7..35f21e0ec 100644 --- a/api4/params.go +++ b/api4/params.go @@ -47,6 +47,8 @@ type ApiParams struct { ActionId string RoleId string RoleName string + SchemeId string + Scope string Page int PerPage int LogsPerPage int @@ -167,6 +169,12 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams { params.RoleName = val } + if val, ok := props["scheme_id"]; ok { + params.SchemeId = val + } + + params.Scope = query.Get("scope") + if val, err := strconv.Atoi(query.Get("page")); err != nil || val < 0 { params.Page = PAGE_DEFAULT } else { |