From 81522cbae16c6aadb1b789f3f875dc50f10cc005 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 4 Jun 2017 19:30:25 -0400 Subject: Clean up --- modern.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modern.go') diff --git a/modern.go b/modern.go index 6277796..79bebd3 100644 --- a/modern.go +++ b/modern.go @@ -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 -- cgit v1.2.3-70-g09d2