Browse Source

Fix error introduced by SHA: 30252123a02ab76a8f6292491281daa782239bde,
closes #66

Bruce Marriner 9 years ago
parent
commit
c2fd09c51d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      restapi.go

+ 4 - 4
restapi.go

@@ -110,10 +110,10 @@ func (s *Session) Login(email string, password string) (token string, err error)
 	response, err := s.Request("POST", LOGIN, data)
 
 	temp := struct {
-		token string
+		Token string `json:"token"`
 	}{}
 	err = json.Unmarshal(response, &temp)
-	token = temp.token
+	token = temp.Token
 	return
 }
 
@@ -129,10 +129,10 @@ func (s *Session) Register(username string) (token string, err error) {
 	response, err := s.Request("POST", REGISTER, data)
 
 	temp := struct {
-		token string
+		Token string `json:"token"`
 	}{}
 	err = json.Unmarshal(response, &temp)
-	token = temp.token
+	token = temp.Token
 	return
 }