From 055a4cdc10c278724585e3d4d299b2387abeb351 Mon Sep 17 00:00:00 2001 From: Howl Date: Sun, 20 Nov 2016 12:06:11 +0100 Subject: [PATCH] Use JSON instead of GLI ZINGONI --- app/v1/beatmap_requests.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/v1/beatmap_requests.go b/app/v1/beatmap_requests.go index f329fa6..4219b58 100644 --- a/app/v1/beatmap_requests.go +++ b/app/v1/beatmap_requests.go @@ -2,6 +2,7 @@ package v1 import ( "database/sql" + "encoding/json" "strconv" "time" @@ -119,11 +120,8 @@ func BeatmapRankRequestsSubmitPOST(md common.MethodData) common.CodeMessager { case nil: // move on case sql.ErrNoRows: - if d.SetID != 0 { - md.R.Publish("lets:beatmap_updates:sets", strconv.Itoa(d.SetID)) - } else { - md.R.Publish("lets:beatmap_updates:single", strconv.Itoa(d.ID)) - } + data, _ := json.Marshal(d) + md.R.Publish("lets:beatmap_updates", string(data)) default: md.Err(err) return Err500