Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Commit d75fb37

Browse files
committed
Made Account.Sync user id independent
1 parent 1ed4048 commit d75fb37

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

account.go

+9-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ type Account struct {
7373
// Sync updates account information
7474
func (account *Account) Sync() error {
7575
insta := account.inst
76-
body, err := insta.sendSimpleRequest(urlUserByID, account.ID)
76+
data, err := insta.prepareData()
77+
if err != nil {
78+
return err
79+
}
80+
body, err := insta.sendRequest(&reqOptions{
81+
Endpoint: urlCurrentUser,
82+
Query: generateSignature(data),
83+
IsPost: true,
84+
})
7785
if err == nil {
7886
resp := profResp{}
7987
err = json.Unmarshal(body, &resp)

0 commit comments

Comments
 (0)