Use JSON instead of GLI ZINGONI
This commit is contained in:
parent
aef33f708a
commit
055a4cdc10
|
@ -2,6 +2,7 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
"encoding/json"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -119,11 +120,8 @@ func BeatmapRankRequestsSubmitPOST(md common.MethodData) common.CodeMessager {
|
||||||
case nil:
|
case nil:
|
||||||
// move on
|
// move on
|
||||||
case sql.ErrNoRows:
|
case sql.ErrNoRows:
|
||||||
if d.SetID != 0 {
|
data, _ := json.Marshal(d)
|
||||||
md.R.Publish("lets:beatmap_updates:sets", strconv.Itoa(d.SetID))
|
md.R.Publish("lets:beatmap_updates", string(data))
|
||||||
} else {
|
|
||||||
md.R.Publish("lets:beatmap_updates:single", strconv.Itoa(d.ID))
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
md.Err(err)
|
md.Err(err)
|
||||||
return Err500
|
return Err500
|
||||||
|
|
Loading…
Reference in New Issue
Block a user