Browse Source

Fixed login, so it works :)

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

+ 1 - 3
restapi.go

@@ -129,9 +129,7 @@ func Request(session *Session, method, urlStr, body string) (response []byte, er
 // Login asks the Discord server for an authentication token
 func Login(session *Session, email string, password string) (token string, err error) {
 
-	var urlStr string = fmt.Sprintf("%s/%s", LOGIN)
-
-	response, err := Request(session, "POST", urlStr, fmt.Sprintf(`{"email":"%s", "password":"%s"}`, email, password))
+	response, err := Request(session, "POST", LOGIN, fmt.Sprintf(`{"email":"%s", "password":"%s"}`, email, password))
 
 	var temp map[string]interface{}
 	err = json.Unmarshal(response, &temp)