Explorar o código

Fix Login crash by returning immediately

Seth Moore %!s(int64=9) %!d(string=hai) anos
pai
achega
054115bc89
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      restapi.go

+ 3 - 0
restapi.go

@@ -108,6 +108,9 @@ func (s *Session) Login(email string, password string) (token string, err error)
 	}{email, password}
 
 	response, err := s.Request("POST", LOGIN, data)
+	if err != nil {
+		return response, err
+	}
 
 	temp := struct {
 		Token string `json:"token"`