From 3f3cb7c7cede379914eed51c57e58f66ffdd1856 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Tue, 13 Dec 2016 21:47:52 -0500 Subject: return the number of accepted and ignored scrobbles --- modern.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modern.go') diff --git a/modern.go b/modern.go index 9106123..45c92bd 100644 --- a/modern.go +++ b/modern.go @@ -94,10 +94,10 @@ func (store *SqlStore) TrackScrobble(r *http.Request) (ApiResponse, error) { fmt.Printf("%v\n", err) return struct{}{}, err } else { - scrobbles := parseScrobbles(r.Form, session) + scrobbles, ignored := parseScrobbles(r.Form, session) store.PutScrobbles(scrobbles) return Scrobbles{Scrobbles: scrobbles, - Attrs: Attrs{1, 0}}, nil + Attrs: Attrs{len(scrobbles), ignored}}, nil } } -- cgit v1.2.3-70-g09d2