fix: fix.

This commit is contained in:
Andrey Parhomenko 2024-05-31 16:32:18 +05:00
parent 96a0296d23
commit d7e751677f

View file

@ -7,13 +7,13 @@ import "surdeus.su/core/amo/api"
import "fmt" import "fmt"
func (client *Client) GetContact( func (client *Client) GetContact(
contactId int, contactID int,
opts ...urlenc.Builder, opts ...urlenc.Builder,
) (*contacts.Contact, error) { ) (*contacts.Contact, error) {
deal := new(contacts.Contact) deal := new(contacts.Contact)
res := fmt.Sprintf( res := fmt.Sprintf(
"/api/v4/contacts/%d?%s", "/api/v4/contacts/%d?%s",
contactId, contactID,
urlenc.Join(opts...).Encode(), urlenc.Join(opts...).Encode(),
) )
@ -58,7 +58,7 @@ func (client *Client) GetContacts(
func (client *Client) UpdateContact(contact *contacts.Contact) error { func (client *Client) UpdateContact(contact *contacts.Contact) error {
return client.updateEntity( return client.updateEntity(
"/api/v4/contacts", "/api/v4/contacts",
contact.Id, contact.ID,
contact, contact,
) )
} }