diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2017-06-04 19:30:25 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2017-06-04 19:30:25 -0400 |
| commit | 81522cbae16c6aadb1b789f3f875dc50f10cc005 (patch) | |
| tree | ab95db0a843783d4cfcd328e091a01597e241ee1 /modern.go | |
| parent | f154ae1ec88146017abf3de9d14d119facb5fc4c (diff) | |
| download | lastfm-api-81522cbae16c6aadb1b789f3f875dc50f10cc005.tar.gz | |
Clean up
Diffstat (limited to 'modern.go')
| -rw-r--r-- | modern.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -83,7 +83,12 @@ func (store *SqlStore) AuthGetSession(r *http.Request) ApiResponse { var response struct { Session *Session `json:"session"` } - session := NewSession("thibauthorel", r.FormValue("api_key"), "2.0") + session := &Session{ + User: "thibauthorel", + Client: r.FormValue("api_key"), + Protocol: "2.0", + Key: randomToken(16), + } store.PutSession(session) response.Session = session return response |
