|
|
@ -163,7 +163,7 @@ func handleGameClassicSessionCount(w http.ResponseWriter, r *http.Request) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func handleSaveData(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func handleSaveData(w http.ResponseWriter, r *http.Request) {
|
|
|
|
uuid, err := uuidFromRequest(r)
|
|
|
|
token, uuid, err := tokenAndUuidFromRequest(r)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
httpError(w, r, err, http.StatusBadRequest)
|
|
|
|
httpError(w, r, err, http.StatusBadRequest)
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -212,13 +212,6 @@ func handleSaveData(w http.ResponseWriter, r *http.Request) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var token []byte
|
|
|
|
|
|
|
|
token, err = tokenFromRequest(r)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
httpError(w, r, err, http.StatusBadRequest)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var active bool
|
|
|
|
var active bool
|
|
|
|
if r.URL.Path == "/savedata/get" {
|
|
|
|
if r.URL.Path == "/savedata/get" {
|
|
|
|
if datatype == 0 {
|
|
|
|
if datatype == 0 {
|
|
|
@ -337,13 +330,7 @@ type CombinedSaveData struct {
|
|
|
|
// TODO wrap this in a transaction
|
|
|
|
// TODO wrap this in a transaction
|
|
|
|
func handleSaveData2(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func handleSaveData2(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var token []byte
|
|
|
|
var token []byte
|
|
|
|
token, err := tokenFromRequest(r)
|
|
|
|
token, uuid, err := tokenAndUuidFromRequest(r)
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
httpError(w, r, err, http.StatusBadRequest)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uuid, err := uuidFromRequest(r)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
httpError(w, r, err, http.StatusBadRequest)
|
|
|
|
httpError(w, r, err, http.StatusBadRequest)
|
|
|
|
return
|
|
|
|
return
|
|
|
|