Skip to content

Commit 8a78eb0

Browse files
ayn2opdiamondburned
authored andcommitted
fix(api): change field name to login
1 parent 0bf2103 commit 8a78eb0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

api/login.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ type LoginResponse struct {
1515
Token string `json:"token"`
1616
}
1717

18-
func (c *Client) Login(email, password string) (*LoginResponse, error) {
18+
// login is the user's email or E.164-formatted phone number
19+
func (c *Client) Login(login, password string) (*LoginResponse, error) {
1920
var param struct {
20-
Email string `json:"email"`
21+
Login string `json:"login"`
2122
Password string `json:"password"`
2223
}
23-
param.Email = email
24+
param.Login = login
2425
param.Password = password
2526

2627
var r *LoginResponse

0 commit comments

Comments
 (0)