Migrate gitea-sdk to v0.12.0 (#133)
Migrate Update code.gitea.io/sdk/gitea to v0.12.0. Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/133 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
12
vendor/code.gitea.io/sdk/gitea/admin_user.go
generated
vendored
12
vendor/code.gitea.io/sdk/gitea/admin_user.go
generated
vendored
@@ -11,10 +11,16 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// AdminListUsersOptions options for listing admin users
|
||||
type AdminListUsersOptions struct {
|
||||
ListOptions
|
||||
}
|
||||
|
||||
// AdminListUsers lists all users
|
||||
func (c *Client) AdminListUsers() ([]*User, error) {
|
||||
users := make([]*User, 0, 10)
|
||||
return users, c.getParsedResponse("GET", "/admin/users", nil, nil, &users)
|
||||
func (c *Client) AdminListUsers(opt AdminListUsersOptions) ([]*User, error) {
|
||||
opt.setDefaults()
|
||||
users := make([]*User, 0, opt.PageSize)
|
||||
return users, c.getParsedResponse("GET", fmt.Sprintf("/admin/users?%s", opt.getURLQuery().Encode()), nil, nil, &users)
|
||||
}
|
||||
|
||||
// CreateUserOption create user options
|
||||
|
||||
Reference in New Issue
Block a user