forked from pothtonswer/discordmuffin
Fixed login, so it works :)
This commit is contained in:
parent
4cb734f809
commit
c858d08208
1 changed files with 1 additions and 3 deletions
|
@ -129,9 +129,7 @@ func Request(session *Session, method, urlStr, body string) (response []byte, er
|
||||||
// Login asks the Discord server for an authentication token
|
// Login asks the Discord server for an authentication token
|
||||||
func Login(session *Session, email string, password string) (token string, err error) {
|
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", LOGIN, fmt.Sprintf(`{"email":"%s", "password":"%s"}`, email, password))
|
||||||
|
|
||||||
response, err := Request(session, "POST", urlStr, fmt.Sprintf(`{"email":"%s", "password":"%s"}`, email, password))
|
|
||||||
|
|
||||||
var temp map[string]interface{}
|
var temp map[string]interface{}
|
||||||
err = json.Unmarshal(response, &temp)
|
err = json.Unmarshal(response, &temp)
|
||||||
|
|
Loading…
Reference in a new issue