mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 12:49:21 +02:00
Pass with_relationships param for accounts
This commit is contained in:
parent
6002284c5a
commit
9816045c21
|
@ -56,7 +56,9 @@ type AccountSource struct {
|
||||||
// GetAccount return Account.
|
// GetAccount return Account.
|
||||||
func (c *Client) GetAccount(ctx context.Context, id string) (*Account, error) {
|
func (c *Client) GetAccount(ctx context.Context, id string) (*Account, error) {
|
||||||
var account Account
|
var account Account
|
||||||
err := c.doAPI(ctx, http.MethodGet, fmt.Sprintf("/api/v1/accounts/%s", url.PathEscape(string(id))), nil, &account, nil)
|
params := url.Values{}
|
||||||
|
params.Set("with_relationships", strconv.FormatBool(true))
|
||||||
|
err := c.doAPI(ctx, http.MethodGet, fmt.Sprintf("/api/v1/accounts/%s", url.PathEscape(string(id))), params, &account, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue