Gh 19916 mmctl list deactivated users only (#26646)

Этот коммит содержится в:
Ezekiel
2024-04-30 20:49:50 +08:00
коммит произвёл GitHub
родитель 10a59619c7
Коммит b6a8965969
6 изменённых файлов: 352 добавлений и 88 удалений

Просмотреть файл

@@ -1094,7 +1094,7 @@ func (c *Client4) GetUsers(ctx context.Context, page int, perPage int, etag stri
return list, BuildResponse(r), nil
}
// GetUsersWithChannelRoles returns a page of users on the system. Page counting starts at 0.
// GetUsersWithCustomQueryParameters returns a page of users on the system. Page counting starts at 0.
func (c *Client4) GetUsersWithCustomQueryParameters(ctx context.Context, page int, perPage int, queryParameters, etag string) ([]*User, *Response, error) {
query := fmt.Sprintf("?page=%v&per_page=%v&%v", page, perPage, queryParameters)
r, err := c.DoAPIGet(ctx, c.usersRoute()+query, etag)
@@ -1107,7 +1107,7 @@ func (c *Client4) GetUsersWithCustomQueryParameters(ctx context.Context, page in
return list, BuildResponse(r), nil
}
if err := json.NewDecoder(r.Body).Decode(&list); err != nil {
return nil, nil, NewAppError("GetUsers", "api.unmarshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
return nil, nil, NewAppError("GetUsersWithCustomQueryParameters", "api.unmarshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
return list, BuildResponse(r), nil
}